If I understood the story correctly Ra's was spared the Pit but his wife took his place. Why didn't he break into the Pit to save her?
Ra did not know his family is in the particular pit until the time, his daughter Talia informed him. When he was exiled he thought only he is punished for the love with the daughter of the warlord.
When the warlord found out...
...the mercenary was condemned to this pit
But then he exiled him instead.
The mercenary understood that it was the daughter who had secured his release.
But what he could not know was the true price of his freedom
She took his place in the pit.
So Ra was unaware of his wife's imprisonment in the pit. So there was no reason for him to come back. But later he found out what happened to his family by Talia after she escaped the pit. But as his wife was dead by then, there was no reason for him to come back except to take revenge from the prisoners for the barbarism they did to his family. This concept is clear from Talia's admittance to Batman.
I climbed out of the pit.
I found my father...
...and brought him back to exact terrible vengeance.