I can imagine a situation where that's true. But right now, for almost any situation, a series of super-bunkers is orders of magnitude cheaper and more effective. A lot of ridiculously destructive things can happen to Earth and it will still be a better place to live than Mars.
The solar system is much cleaner place now. All the planetismals and most of the asteroids have impacted or been kicked out. Big things are in stable orbits. There are a lot of dangerous asteroids but we track most of the large ones. There is a risk that something big will be kicked out of orbit but it is rare enough we don’t know how unlikely.
Large impacts, 5km or bigger, are every 20 million years.
And one should also bear in mind that Mars is at no less risk of meteor impacts than Earth.
I used the wrong word when I said meteor. They’re too small. A comet or asteroid of 100km diameter would raise the temperature of the surface of the Earth by hundreds of degrees and then there’d be decades of darkness. https://www.sciencedirect.com/science/article/pii/S001632872...