Some women get an unwanted pregnancy and they have no job or place to live.
They might grow up and actually take care of the baby or they will just neglect it like everything else in their live.
No matter what though that punishment is too extreme and would never come to pass.
Many people can grow into the role they've created for themselves. I would advocate simply punishing them after they've committed a specific crime, Like killing it, Abandonment, Or neglect. After they do some actual harm to the individual then they should just be subject to the law at that point.