I think even trillions is an understatement. Quadrillions is something we could achieve with today's technology alone, thats about the point you run into thermal problems, where the Earth would no longer be able to radiate away all the heat we would generate, even assuming we sent mirrors up into space to reflect 100% of the sunlight away.The Earth is not overcrowded. It's just very poorly managed. We could fit trillions by throwing out our modern concept of cities. The biggest problem is reliable cheap energy for the huge towers of hydroponics we will need. We already waste a third of all farm land on live stock feed.
Its interesting to think that if the entire Human population moved into a city with the same density as Tokyo, it would be about the size of Colombia. The main issue is with Human's insistence on living with massive inefficiency. Everyone wants to live in a suburb in a single family home with 1 acre of land.