Long-term survival and overall advacement and achievements are a part of humanity's prosperity. Arguing whether we should do space travel is like wondering if we should leave our cave when there are more pressing needs. Sure we do, but thanks to a few crazy cavemen who made it to Europe and Asia, and from there somehow miraculously ended up in Australia and the Americas (holy shit), we maximized the chances that our civilization makes it anywhere. If we were shy to go to places we had no obvious benefit in going, we could be sitting in a cave somewhere in Africa wondering if those Homo Callidus flying helicopters overhead are gods.
I know it looks like a stupid analogy, because Mars is more barren than post-Apocalyptic Antarctica, but to the cavemen it made no sense at the time to travel far too, no matter that now, in hindsight, it looks like the wise thing to do it. When a deadly virus kills all humans on one of the planets we live on, the rest of us will be more thankful that we did the unwise thing to go where we had no business being, instead of fighting world hunger on a doomed world.
On top of that, it is not like we're using a huge part of humanity's resources for space travel. With the space travel money you couldn't make a dent in the hunger problem, or any other major problem. It's pocket change. For something that reshapes humanity's future. And inspires people, contributing to the welfare of the entire world. When humans land on Mars, you'd bring hope, joy and pride among all people on Earth, including some of the people who have trouble finding what to eat.