Let’s see, an odd chance of extinction in several million years due to an asteroid or certain extinction within several hundred years due to a climate catastrophe, which one should we prioritize? Hmmm.
If there are humans in space habitats and (better) on transit with colonisation ships to other star systems, the climate of our homeworld doesn't really matter for the survival of the species.
Still, it's much better to solve both. Especially since space technology is still in its infancy. Abandoning either would be a folly.