Lyanna dies shortly after giving birth to Jon but as Ned is there to rescue her. The exact timing hasn't been solidified, I don't think, but there would be no reason for Lyanna to fear that Robert would kill Jon if he hadn't already done it to other Targ children. Without Aegon1's death, Jon isn't an aire.
I think Lyanna knew Robbert all too well enough to know that he could not suffer the baby to live. It meant too much to Robbert. A betrayal of his betrothal to the woman he loved without question, a last fuck you from the man he killed at the Trident, and a threat to whomever claimed the throne.
No need to see dead kids to logically conclude this.