I've struggled with this for a while. As context to what I'm going to say, know that I've been gravely concerned about climate change for a good while. The rate, quantity and quality of 'bad news' climate-change related data has been increasing exponentially, and I might even be using that word in a literally correct way.
I've posted this elsewhere, but I'll just summarize.
> An earth even 10 degrees warmer than now will be much more habitable than the Moon or Mars ever will be.
To first and second approximations, your statement is spot on accurate.
Mars has 1 or 2% of our atmosphere.
Mars has radiation.
Even under some of the best SpaceX scenarios, it will be something like $100/pound to the surface of Mars.
...many others...
I've come up with two basic advantages Mars has, or could have.
1. Its extremely thin atmosphere makes it virtually harmless to structures, to things we might build there.
I think that it's possible that the climate here on earth will get so wild and so intense that the air itself will become our primary physical enemy, in the form of storms. That is, property-damaging winds and floods might become frequent and wide-spread enough that any kind of large-scale surface building becomes impractical.
I haven't seen any science on this specific to this scenario, and, objectively, it's unlikely, but it's something to consider.
So, assuming it's not possible to build above ground, surely it's still cheaper to build underground on earth than above ground on Mars? This is the second advantage I can imagine for Mars.
2. There will always be (relatively) few people on Mars, and all of those people will be living with pretty intense self-sustaining frameworks/environments.
If things get really bad on earth, it's possible, perhaps likely, that people overall will make the future of other groups of well-prepared people precarious. I don't really need to go into what all that means.
So, those are the two Mars-provided 'survival-level' advantages I have managed to come up with. And both of them are contingent on some pretty extreme stuff happening here on earth.
In closing, I'll say that I agree with Elon Musk's statement about how we may as well get started now, rather than later. Over a long enough timeline, human survival on earth approaches zero.