First, water is pretty abundant almost everywhere on Mars.
Second, carbon is abundant and nitrogen is abundant enough to make food and plastic production viable.
Third, Mars has an atmosphere which is thick enough to provide some protection from radiation and meteorites but thin enough that conductive heat loss isn't too big of a concern. Also, aerobraking massively decreases the amount of fuel required to get to Mars.
Fourth, Mars probably has enough gravity to prevent most of the health risks associated with low gravity.
I don't think either Mars, the Moon, or asteroids are dead ends for colonization. In the long, long run I think more people will live in rotating habitats in cis lunar space than on Mars, and more people will live on Mars than the Moon, but I think there are enough resources for millions or perhaps billions of people to live on Mars.
The Moon has plenty of solar to harvest.
Says who? The solar constant on Earth is about 1360 W/m².
Due to the atmosphere, only about 1025 W/m² actually get to the surface.
Mars, just from applying the inverse-square law has an average solar constant of about 589 W/m². Due to the lack of clouds and thin atmosphere, most of that reaches the surface.
So basically you get more than half the energy per unit area than on Earth. Coupled with batteries or power-to-gas and even wind power, I see no major power problem on Mars.
It's not as if there's a lack of usable land for solar arrays or big stacks of batteries on Mars...
[1] And right next to an eternally shadowed crater we know has hydrogen, probably in water.
In the far future we might have better habitats in the asteroid belt than on Mars, but that's pretty far out. In the medium term, I expect Mars will be an important fuel stop at the least.
I guess there'd be a kind of a self-perpetuating economic force at work: mining would be most lucrative when the products can be consumed near where they're made, and if there's a heavy demand for construction in the asteroid belts then the asteroid belts are where most of the materials will come from. If it's on Mars, then the materials will be gotten on Mars. (That's assuming that material shipment is expensive. On the other hand, if you can mine iron in the belts and then just lob it at Mars with a rail gun and have the Martians drive out in rovers to collect the splatters of molten metal off the surface, then maybe the economics of non-local mining can work out.)
You might even get most of the stuff aside from metals as byproducts of the metal refining process (water, oxygen(from oxids) and carbon mostly). Nitrogen and Phosphor might need importing.
Most of the leftover asteroid serves as Protection against small collisions.
I'm assuming that huge amounts of methane (or other suitable fuel) and oxygen will be wanted for propellant, though maybe ion propulsion makes that less essential.