Assume there is a medieval city with 100 million souls inside. Let's ignore the questions why they wanted to build such a city.
In next given conditions, could this city be possible?
the world follows basic physics rule.
There is a magic that enables construction of building with a maximum height of 1,600 meters and underground 500 meters. (And I mean construction, not maintaining)
The Magic might be the knowledge how to build the city and a plan for the city
The city should be built with pre-17th century technologies.
Unlimited workers and resources provided.
Yes, there should be infrastructures like water supply, market, harbor, etc.
(Please don't say things like Build human wall or Build a house with gold coins kind of stuff.)
I mean possible within the meaning of maintenance of buildings and the city itself. I don't care about Law and Order or if half of city just die within a year.
The city will be enclosed by a wall, and its size should be less than 8,000 square kilometers.