That's open question for humanity. I respect both sides of it but I am little more pro to residences in other planets as we are on tech breakthrough on limitation of Earth. Now, surviving means occupying other planets.
However, these are just my thoughts you can have different.
We still have a good few thousand years until we make the Earth anywhere close to as inhospitable as the second best planet in the Solar System - and probably much more than that before we run out of space on Earth.
It makes far more sense to colonize the Arctic, the Gobi desert, the peaks of the tallest mountains, and similar places here on Earth before even contemplating the colonization of Mars. Let's first have a 10M-strong self-sustaining megacity at the South Pole before contemplating absurd projects like a Mars colony.
I have different take on this. We already shown significant decline in Fertility rate of whole world. Its right now 2.2 against nearly 5 in 1950s till 1970. 2.1 is replacement only. So, we are sorted there from occupying Glaciers,Mountains, etc.
Moreover, Average age of many countries are increasing. That might need support in near future. Migration is filling up that gap in Western world.
As per current prediction world population will peak around 2080s and then decline.
Problem is that decline. Since, Governments are working on selling futures (e.g. Bonds). We need new frontier to make things exciting for new generations up ahead.
People aren't making more children because they largely can't afford to, either in actual resources, or in time spent. And, unlike in a rural community, children don't have any "return on investment" - plus, you generally have to raise them alone even when they're no longer toddlers, rather than relying on an entire community to do it together.
There's no great mystery, and a colony on Mars will not change this even one iota.
> because they largely can't afford to, either in actual resources, or in time spent
But that's absolutely not true. People are so wealthy right now that they can afford practically an unlimited amount of children. The avoidance of having children is almost entirely shaped by the cultural environment and not economic environment.
> relying on an entire community to do it together
I am not sure that it ever was a case. "Relying on an entire community" to raise children generally meant that children were raised mostly by themselves.
> The avoidance of having children is almost entirely shaped by the cultural environment and not economic environment.
Cultural factors are certainly a part of it, but probably mostly in the sense that we are (rightfully, I believe) far less willing to let children die young or get maimed. But economic factors are a huge thing; I don't know where you live that you thing young people "can afford practically an unlimited number of children", but in most of Europe and the USA it is in fact impossible for the bottom 50+% of young couples to even support themselves, not to mention a child, on a single income. And it's also very hard to raise a child 0-4 in a city while working full time+.
> "Relying on an entire community" to raise children generally meant that children were raised mostly by themselves.
No. Children, historically, after they became capable of roaming around, were raised by grandparents, neighbors, their older siblings etc. Even when they were away from adults, they'd be roaming near the village in groups with older children.
Apart from a gamma-ray burst, what do you imagine could happen to the Earth to make it as inhospitable as Mars?
Asteroid hits wouldn't come even close. The worse disease imaginable would not make the air as permanently dangerous to life as Mars' atmosphere is. So what exactly would motivate this move?
However, these are just my thoughts you can have different.