It is possible that humanity could be wiped out and Earth could re-roll another species that could do it instead... but once you dispose of the fashionable self-loathing and look at it rationally, it's not a good bet. (But that's a longer post.)
That said, there's also a pure research vs. direct action aspect, again going back to the fact that the tech for a true off-planet space presence will inevitably produce extremely useful technology for those of us still on Earth. It may be easier to see by putting it in the past... no amount of cooking bread and giving it to hungry people would ever have produced refrigeration technology, or the wide dissemination of it. Had people 100 years ago followed the advice of only taking direct actions to prevent poverty, we would, paradoxically, have a lot more of it today. Again... we can not serialize our approach to problems, we have to attack them in parallel.
Right. So technology that provides humanity, or some part of it, the means to get people out of the way of what would otherwise be an extinction level event saves the actual, individual lives of all those people that would otherwise have been in the way.
I really find this morality baffling. As I see it extinction level event would be a tragedy on account of the deaths of billions. But the human species, as a whole, is not an individual; it does not think or feel or suffer. Its cessation has no moral value beyond the death of the individuals which make it up.
I'm open to hearing an argument to the contrary; usually discussions of space colonization, it's assumed obvious that perpetuating humanity is important. But I don't see it, and so I tend to view anything that helps actual individuals as a better use of resources.