If your empire was so unbalance that shutting down didn't give you positive income, you just sat paralyzed until someone started taking planets from you.
You could still do things to get back on your feet. Like selling techs and other stuff to your less aggressive neighbours, or getting rid of some high-maintenance improvements.
The AI, on the other hand, had often big troubles recovering from this. Especially when it was losing population due to low approval, and tried to combat the loss of income by increasing the tax rate.