We could treat everyone like millionaires and that wouldn't make an ounce of difference to anyone if our entire species went extinct. Absolutely no treatment we can give to one another prevents a catastrophic event from wiping us all out.
A catastrophic event isn't going to stop and think "Oh hey, humans are treating each other nicely. Maybe I shouldn't wipe them all out?"
Why is being nice to others a moral imperative? In fact - why should any decision be based off morals?
The continuation and survival of the human race is the top priority among a large population of people. Some contribute by researching new medicines (Why do this?), others improve quality of life for others (Why do this?), others have children (Why do this?), and others look for a way to get us away from a potentially doomed planet in case of disaster scenarios. They all have the same reasoning - just different methods.
Morals are subjective to a population. The majority population of humanity has decided that continuation of "us" is a "good thing".
Of course, one could argue things would be better off if humanity went extinct. But that isn't in humanities' best interests (read: survival), so people generally wouldn't agree with you.
"The continuation and survival of the human race is the top priority among a large population of people. Some contribute by researching new medicines (Why do this?), others improve quality of life for others (Why do this?), others have children (Why do this?), and others look for a way to get us away from a potentially doomed planet in case of disaster scenarios."
The vast majority of medical research goes to diseases that pose no existential threat to Homo Sapiens. Even Malaria, which kills upwards of 500,000/yr, does not pose any existential threat. Late-life diseases such as alzheimers have no effect whatsoever on Homo Sapiens, yet receive substantial funding. No, medical research largely serves to decrease human suffering, a goal which I do regard as noble.
Likewise, why does increasing quality of life matter? Humans will continue to reproduce even in conditions of abject poverty. What does quality of life have to do with anything? (You, after all, seem to think putting humans in a thin metal tube and hurling them through space to live out their life on a cold, barren rock is important. Surely you don't think this would increase their quality of life).
As for children, I have no clue what people see in them. But they seem to reproduce because having children makes them happy, not out of some perceived obligation to Homo Sapiens.
My point isn't that you need to share my morals. My point is that you should acknowledge your morals are not universal.
I'm kind of playing devil's advocate here, but I think there are some key differences with your analogy.
The goal of colonizing another planet would give a small subset of people the ability to continue living if the people on Earth were to destroy themselves. This is a hypothetical situation that -if it happens- will kill off almost everyone, dragging hopes, dreams, money, infrastructure, standards of living (basically everything that makes life enjoyable) with it. So if that is destroyed, why does it matter if humans continue living as a species? Especially on an extremely harsh planet.
Your analogous examples differ because all of those things -medicine, quality of life, children, even sustaining our environment- help us now. We do those things to make our own lives longer, improve our own children's lives, and make our quality of life greater, not some hypothetical future civilization away from Earth. You're right that humanity's best interest is survival, but I think way more people are concerned with their own survival and I think that's where the true incentives for those examples lie.
The people who think going to Mars is a good idea will go to Mars, procreate, and slowly fill the galaxy. They will out-compete the Earth-bounders. Darwinian evolution.
If I cared about perpetuating my DNA, I'd donate to sperm banks to produce more genetic offspring than I have any hope of supporting on my own. From the Darwinian perspective, I would be regarded as enormously successful.
A catastrophic event isn't going to stop and think "Oh hey, humans are treating each other nicely. Maybe I shouldn't wipe them all out?"