First some perspective: Earth's landmass is ~197 million mi². Assuming you are describing the population density of Hong Kong (67,000/mi²), that is a world population of ~13.2 trillion or ~1700 times the current world population.
So, the 7 big obstacles here are water, food, air quality, global heat, durable goods, population growth & power.
The first thing to consider is that this world would not have NEARLY enough natural freshwater. Even at current world populations people are beginning to consume fresh water faster than it replenishes. This means that over 99% of the world's drinking water would have to come from desalinated Ocean water. This would consume tons of power and generate tons of heat, but the planet has enough salt water to do this. (We'd likely need to export the excess salt to other worlds since we would not have enough space for it all).
Second thing to consider is that you need food. You need about 20,000ft² of farmland to sustain a human life with modern technology. If you stack troughs of indoor farmland with synthetic lighting, you can probably compress it down to 3-4 layers worth of indoor farmland for each story of human residents, throw in some excessive GMO manipulation, and you might be able to cram it down to 2000ft² of indoor farmland per person meaning the majority of your world city is still actually indoor farms. Being constantly feed by a massive pipe system of desalinated & recycled water. This is where reality starts to question this model since you would need to feed such a massive amount of these farm with water from oceans, delivering enough water to places that are 1000 miles inland would be questionably doable. So you are hitting the realm of unrealistic, here, but if civilization had enough time to adapt to this density, then assume that the whole world would need a MASSIVE underground pipe system. Even then, in-land areas would need to be very efficient about how they recycle their water once piped in in order for any pseudo realistic pipe system to be able to import the needed volumes of water just to deal with irrigation evaporation.
Third, even with all this indoor plant mass, current vegetation may not be efficient enough at those ratios to produce enough oxygen for everyone, plus all the emissions from industry and daily life would be fatal without a stopgap. Going back to genetic engineering our food, those plants would also need to be breed with air filtration in mind. Basically, you would have to co-mingle the farms and populations as much as possible so that your city grid basically encapsulates residences and businesses in the farmland so that circulating CO2 and O2 could happen as efficiently as possible. By being close to high human density, the plants could be engineered to have massive matablisms so they grow fast, filter lots of CO2, and feed more people per cubic foot. The garbage and sewage system of the city would have to recycle all organics back into the farmland; so, the place would probably stink worse than a medeville city, but could be livable if the crops are properly engineered to assure this symbioses.
Forth, people make heat, desalination makes heat, farm lamps make heat, heat, heat, heat... basically, your society has become a massive self cooking oven; so, you'd need to combat that by not just restoring the ozone layer, but by going in the opposite extreme. You'd have to terraform the upper atmosphere to block so much sunlight that day would become an eternal twylite. At this point our machines do as much to keep us warm as the sun.
Fifth, there is nowhere left to mine resources; so, even what is left underground can not be safely gotten without creating dangerous sinkholes that would destroy the city above. landfills could also no longer exist. If you can't recycle it, you don't make it. On top of that, this planet would need to sustain a massive fleet of freighters constantly pulling in resources from many nearby planets to even begin to approach this level of development, much less sustain it.
Sixth, population growth is no longer an option, at this point human life has become such a burden that laws come into place to control growth including mandatory sterilization, family size limits, and possibly institutionalized genocide. Civil unrest would be unavoidable, meaning governments would need to maintain absolute power over people's lives. Democracy and privacy are both dead, predictive AIs would quell rebellions before they happen, and the common person has no access to weapons or education with which to resist.
Seventh, is power. No current form of power is still an option. All the machines needed to keep people alive mean that each person has a much larger power footprint than we have today. Solar, fossil fuels, etc just don't cut it. For a civilization to reach this point they need to invent an economical solution to cold fusion using the hydrogen available in what's left of the ocean's water. This means that the world would slowly consum it's oceans releasing its oxygen to form that much needed ozone I mentioned earlier and the hydrogen to power the fusion reactors. Eventually, the oceans would begin to disappear, but even at these rates of consumption, this civilization could last a pretty long time.
Lastly, going back to my previous estimation of hong kong population density, this means that the average person accounts for 416 ft². That may not sound like a world superstructure at first, but this means that your 2000 ft² of hi-tech farmland, the place you live, the place you work, the place your kids go to school, your fair share of everything and everywhere you go you needs to all fit into 416 ft². So, I suspect, this would probably look like an average continuous building height of ~8-12 stories. Obviously that would just be an average height; so, you'd have rich, "remote", and ruined areas where the super building is shorter than that, and other areas that are massively built up super structures that are hundreds of stories tall of continuous structure; so, I'd say this is probably the low end of what a world building would look like. But if you were to contiguously build up this whole super building up to the pentacle of what material integrity would allow, you could probably get up to a few quadrillion people at the very high-end assuming you get really good at recycling and importing new materials.