Given sufficient energy we can give a first class standard of living to as many people as the world can physically hold. Plants can be grown under artifical light, buildings can be built up into the air and underground, mountains can be flattened and jungles cleared.
It's not a question of whether we can have a world of 6 billion comfortable people, it's a question of whether we want to.
I too think its technically possible - but I wonder if, when everyone's material needs have been taken care of, wont we just have so much time on our hands that we'll fill it with sex and violence? Out of sheer boredom? Next thing you know our population is 12 billion, and earth and the species is once again in danger of being wiped out by our own hand. Even if the material/technological solutions are put into place, the
civilizational challenges remain intact: i.e., how to exercise free will in non-suicidal ways at the species level.
It takes an enormous socio-cultural-institutional apparatus, and many many years of it, to properly "socialize" a human being, from the moment they're born, and shape them into an adult who is willing to discipline their free will in support of (ecological) sustenance and (social) coexistence. A civilized adult is extremely expensive to create; and very easy to destroy; and the enormous apparatus that is needed to create them, is itself extremely fragile. Civilization itself, thus, is extremely fragile, easily disrupted, easily derailed, easily destroyed. That -- on the level of liberal education and socialization for all infants -- is what will remain elusive to us I think, much more elusive than creating technological solutions for purely material requirements (food, shelter, toys). The latter I think is possible; the former, nearly impossible.
Thats why I think, despite technological advancements in food, shelter, medicine, communication, toys, etc, we will perpetually remain in danger of wiping ourselves out. "Material needs" ultimately has very little to do with it I think.