I'm focussing on things that specifically relate to supporting large population densities.
If you have people, they will want to go somewhere, which means roads, which means you'll have maintenance crews. Your big walls may be pretty, but walls block things, while roads connect them.
What does your public transportation look like? How does the typical person go to work? Cross the city? Leave and enter the city? Do you think that enough food gets into the city on wooden carts? If you're used to American cities, look into other countries for realistic models of public transportation. Please get more creative than using brontosauruses as busses.
Look into a magical adaptation to rail systems. Maybe you can use waterways or levitation.
Water and food
This is an essential need for living. Water delivery isn't something you can skimp on, and it becomes an exponentially larger issue when you have large populations. You can only pump so much water through a pipe. If you make bigger pipes, you need to dig deeper to accommodate that pipe. You also need to figure out how to get food distributed to so many people. This is why we now have supermarkets.
At a certain point, your population will want to go upward to fit more space in the small area. Hong Kong has minimum building height of 60 stories on the inland. This means you have to figure out how things get moved up and down, which means good elevator "technology" and identifying how you're going to build upwards without immense steel foundries. Try walking a bucket of water up 40 flights of stairs to get a feel for this issue.
You need a solid set of sewers to take that much sewage away from where it's being created, and you need a place for that sewage to go. If you're on a river, then there is a temptation to put your sewage there, but that results in your river being nick-named 'the big stinky' or something similar. If you have sewage being generated in great amounts, it actually benefits you to have sewage treatment plants, not just to manage your diseases, but also because you can produce some fantastic fertilizer by separating out the organics from the water.
You also have to figure out what happens to a society's garbage. If the city doesn't figure it out, you WILL wind up with vacant lots becoming trash dumps. Socialist model has trash services that set standards. Capitalist model charges people for that service, and they can vary the standards by paying more. Both of them need police to enforce the rules.
Disease and vermin
Disease is kinda like criminals, except the criminals are tiny. You need a special police force to figure out where the diseases live and which people are harboring and feeding the criminals.
Vermin are a side effect of poor trash disposal practices. They congregate in areas where people shed their leftovers, because leftovers are yummy. This might be trash dumps, sewers, or just poorly stored food. You need people who know how to spot the problems and wipe out the breeding grounds, otherwise the vermin will inevitably start feeding on people and spreading disease.
On this one, I'm going to recommend some reading:
- Pratchett's "Guards, Guards!"
- Glen Cook's "Garrett, PI" series
- Judge Dredd
They're all well worth the entry fee. The first involves building a police force in a fantasy world, the second describes the kinds of crimes that you can expect to happen, and the last specifically deals with overpopulation.
There are other challenges particular to dealing with crimes in a large city because some areas (burrows, vertical living complexes, gated communities) pose challenges and threats that you don't get in smaller populations.
Postal services and other communication
You don't get big cities without a decent communication network. Maybe this means a postal service with drop-tubes, homunculi sorting letters, or airways filled with owls. Remember that your characters aren't the only ones who have to send letters.
When you get enough people together, they will inevitably find a reason to get angry and destroy things. Keeping the reasons to a minimum helps, but more often than not, the people at the top just don't notice how annoyed the poor people are unless the poor people wreck some shit. Riot control involves having a militia to minimize the damage. For authoritarian regimes, it involves having riot police whose job it is to teach the miscreants a lesson, but fiction is filled with clever methods of "harmless" riot suppression, like riot foam or something that turns all of the surfaces slippery.
Terrorists come in two categories. The first is a form of psychological warfare operations, and the other is advanced rioting. In the first case it's just an advanced policing issue. The population recognizes the harm, and will work with the police to prevent it. In the second, the people ARE the insurgents and the population is sympathetic, which results in trying to keep the entire population in jail at once. It is often a major plot point finding out that the former is actually the latter.
There are a lot of things that any large group of people will need to figure out. These are not inherently city issues, though, so I'm not going to go into much detail.
Poor districts need more police, they have a higher population density, and they have greater need for social services, but this happens for a settlement of any size.
How is money collected to run all of this? Do you even collect taxes, or just enslave random people to do the work?