An unrealistically gloomy take on things.
First, we are not going to run out of fossil fuels any time soon. Arizona, for example, has enough coal to supply all US electricity needs for 400 years. Of course, we'd rather not use coal, but it's there. Likewise, horizontal drilling and fracturing ("framing") has used nowhere close to its potential, because there are vast frac'able fields that have never even been touched. This technology is why the US has allowed the US to stay within the Kyoto Accords, even as wind and solar countries have proven unable to do so.
Second, we have other technologies than solar that can generate plenty of needed energy - such as nuclear, which has a virtually limitless supply of fuel if you use thorium, and a very large supply even with uranium. Solar and wind have the problems you stated, plus they are intermittent, and solving that latter problem is very expensive.
Third, as we get more prosperous, the population goes *down* as can been seen in every country except some of the poorest. That means the carrying capacity becomes less of an issue in terms of agriculture.
Fourth, technology still has a long ways to go. Fusion power will probably work a few decades from now. The computer revolution is changing and improving technologies everywhere, both from computer design and embedded computing in all manner of devices. And, the semiconductor revolution, through its advanced fabrication technologies, has also led to amazing advances in the use of light - for sensors, for lighting, for communications, for photography, for medicine, and other uses.