Even a relatively inhospitable earth is much, much more livable than the celestial bodies we can reach in reasonable time. Even living 100% underground would be easier than trying to establish bases on the moon or Mars, with a hope that we could find a way to clean up the mess that we created.
If we find some faster-than-light travel mechanism and a star group that includes a planet like our own, then perhaps there's a way out of here.
On the other hand, why not try to achieve something like ... getting along better here? We could find ways to create more clean energy here on Earth, clean up existing messes, better harness the 3/4 of the globe covered by water, etc.
Plus we have a lot of societal issues to try to address. How would living on another planet solve distinctly human problems like war, conflict, need to pollute the natural environment of a new planet, etc? Why not look at how we can improve our own self-governance? After all, if we do escape this rock, it's not like we're magically going to become more altruistic, compassionate, etc. We'll still suffer from the same problems we do here, just with even more stressors like "my body boils over if I dare step outside unprotected". Sounds super depressing to me.