Sure, resource allocation can be a instrumental to those goals of human well being, but not the directly optimized metric. So, for example, I care very little gdp/capita when you can just as easily measure life expectancy or food stress levels.
On such counts, capitalism has a mixed record. Today, for example, a lot of countries that are "more capitalistic" than others have poorer metrics of human development than those that are "less capitalistic".