Becoming a mystical unborn is a Fate Worse than Death (TV Tropes warning), worse than lifelong physical and emotional abuse, torture, or enslavement. Tethered to life but never living. Unable to interact with the world physically, they'll never feel a loving touch or be able to do any good deeds. They can't even lash out at the cause of their horrible state, nor leave her side. They don't have any hope because even when the witch dies they will remain tethered to her soul forever, neither living nor dying.
After seeing the horrible things the witch did to her own unborn child's soul, no other spirit will trust her to be their mother. They figure it's better to not get a body at all than to be trapped with that monster for all eternity. No future pregnancy will result in a viable child because no soul will enter a developing body in the witch's womb. Without a soul, the fetal body won't continue developing past a point and becomes a miscarriage.
Perhaps a witch with a mystical unborn has a change of heart some time later. Could she release the mystical unborn, allowing its ethereal body to die and its soul to depart? With no cursed creature tethered to her, would she once again be able to have children, or would souls remember her evil deed and not trust her still? Could she go through a process of repentance or penitence to regain trust and thus be able to have children again?
Note this works whether souls are reincarnated or whether they exist before they're physically born but only live one mortal life on this plane of existence.
In your world souls are reincarnated? If so, a mystical unborn remains trapped, tethered to the witch's soul as it enters its next life. The child who was a witch in a past life would be haunted by the mystical unborn without understanding why. If a girl, she would likely be infertile for the exact same reason she was infertile in her past life. A spell or ritual (exorcism, anyone?) could release the mystical unborn, allowing it to move on to its next life as well as freeing the witch-in-a-past-life from its curse. Otherwise the mystical unborn continues to haunt the former witch throughout multiple lives. Or perhaps as divine punishment/justice for her evil, the mystical unborn's soul lives all the witch's next lives in her place, and the witch does the haunting instead, until the two are unbound.
In your world do souls exist before birth, live a single life, and then move on to some other state or plane of existence? In that case both the witch and the mystical unborn become trapped in a sort of limbo forever. Because the mystical unborn never got to live even a short meaningless life, it cannot go on to the next life. The witch would normally be able to move on to the next existence after her death, but because she is bound to a spirit which isn't ready and able to go with her, she has effectively trapped herself. Neither is able to disconnect themselves from the other, so the two are trapped between worlds until a ghost hunter encounters them and undoes the binding spell, or until long after the sun burns out.
You ask, "why would a witch do something that would trap her soul for eternity?" Simply because she - like everyone else - doesn't really know what happens after death, or doesn't care. Her choices are based on what she gets out of her actions in this life, and having a mystical unborn does have many advantages while she's still alive.