Barring some minor discrepancies, this is most likely The 100 (2013) by Kass Morgan.
No one has set foot on Earth in centuries—until now.
Ever since a devastating nuclear war, humanity has lived on spaceships far above Earth's radioactive surface. Now, one hundred juvenile delinquents—considered expendable by society—are being sent on a dangerous mission: to recolonize the planet. It could be their second chance at life...or it could be a suicide mission.
CLARKE was arrested for treason, though she's haunted by the memory of what she really did. WELLS, the chancellor's son, came to Earth for the girl he loves—but will she ever forgive him? Reckless BELLAMY fought his way onto the transport pod to protect his sister, the other half of the only pair of siblings in the universe. And GLASS managed to escape back onto the ship, only to find that life there is just as dangerous as she feared it would be on Earth.
teenages convict on a space station
space station is running out of resources
there are three stations (Phoenix, Walden, Arcadia), Walden being the poorest, Phoenix the richest. That somehow matches your recollection of castes
Glass got in big trouble for being pregnant and blamed a wrong father (quote is from the Wikia):
Once it was discovered that she was pregnant she was forced into telling who the father was. Because of her love for Luke, she blamed his roommate Carter instead - who was then arrested and executed.
What's not really a match is that while she escapes, the other delinquents are sent to Earth, not escaping there.
Found half by memory. I watch the show (which kept the whole "delinquents sent to Earth" thing, but not Glass) and took a quick read of the books once, but I had to go back and confirm.