I don't think people are properly grasping what it would mean to have a set of shelters on Earth that would be equally well funded as a permanent self-sustaining colony off-Earth. You could probably afford equally-sized self-sustaining colonies in underground locations in each of multiple different climate zones as well as multiple undersea locations. Plus each of them could be better hardened in all sorts of ways. But it's nearly impossible to estimate because a permanent, self-sustaining extraterrestrial colony is something with almost unbounded size and complexity. We currently don't know how to synthesize all required materials from nearby planets and the number of people required could easily be tens of thousands.
To be honest, spending that much money on shelters on Earth is downright absurd. Instead of such a monstrous shelter-building program, you could spend 5% of the money on shelters which would be 95% as effective at increasing the probability that humanity would survive a catastrophe. That's the more likely and relevant comparison.