Do you mean uninhabitable like the moon? I guess they'd just stay, then. The pilots wear space suits anyway and the engineers seem to have a neverending supply of capsules they can live in. If it's any worse than the moon I guess they'd go to the moon, since that's something most of my vehicles (mostly spaceplanes) can reach. There's an existing base there, and if there is advance warning they could send up some more base modules too. The biggest problem would be the downfall of their space based culture, since I don't use mods. They'll run out of fuel and they won't have launchpads. Maybe they can shift to an electric rover racing based culture.