I would (if I had a say in the matter) go for the Moon over Mars or an orbital space station. An orbital space station (or collection of them) for a million people would be very hard, because we don't have a convenient small asteroid to mine for building materials and therefore can't ISRU. I'd pick the Moon because it's close enough that when the inevitable black swan catastrophe happens, it's only a few days travel so we'd have a chance of saving almost everyone's lives if all the water or food was lost to depressurisation/the outside environment/surprise mould.
Mars, to rephrase what I wrote before, is less hospitable than all the worst environmental disasters we can experience on Earth, even if those disasters were combined. Being able to colonise it means we can fix basically anything that goes wrong here.
The amount of ingenuity and co-operation needed to go to Mars may be greater than the amount needed to maintain Earth.
I don't see on Mars is safer than just an orbiting space station. Needing to go to Mars or anywhere other than Earth adds complexity to the issue.