The obvious answer to your big question is that capitalism doesnt result in the equal distribution of goods and services. Developed countries have better infrastructure, better health systems, better universities, etc.
But interesting things happen. With the accelerating increase in the use of renewable energy, along with Chinas leadership in the transition to an electro-state and the beginning of a green hydrogen market, capital may eventually flow to regions rich in wind and solar energy resources. Countries like Australia and Argentina may become wind super powers, exporting green hydrogen to markets in East Asia and Europe. Several countries in Africa could become Mega Solar Super Powers, also exporting green hydrogen. In theory, these newly enriched countries will improve their own electric grids as well as improving health, education, etc. China is investing many billions into Africa through partnerships like the South-South Cooperation Renewables Center and the China-Africa Renewable Energy Partnership.
Renewable energy is democratizing. It is approaching critical-mass, and it flexibly scales vertically and horizontally. The energy transition now underway can drive remarkable positive global economic change.
Disclaimer: I am not a big fan of capitalism, but I live in the real world. I doubt anyone is going to suddenly decide to build nuclear power plants on a massive scale in developing countries. But some might be built if there is a global market for green hydrogen.