For Arbitrary Population Size
If you want a solution for any arbitrary k, where k is the size of the total planetary population, it cannot be done.
All fixed resources have their hard limits. This includes planetary surface area and total planet volume. For sufficiently large k, there comes a point where both resources are exhausted and the planet must be vacated.
The only way out is to impose:
1. A hard population limit, enforced through legal/punitive measures.
2. Offshoring requirements for overabundant populations via forced relocation to satellite systems.
3. Zoning requirements that impose a hard limit on the number of residents within their premises, which, if enforced, will prevent immigration once Coruscant reaches capacity.
4. Strict temporary visa allotments that prevent overstay longer than a minimum sufficient period.
All of this serves to cap your total population size to a sustainable number, and does not let your planet's support system scale indefinitely.
For Fixed Stable Population Size
Assume now that you only want to be able to support a total population of k, and are willing to exact measures to prevent excess above this. We will proceed on the premise that a stable population has been produced i.e. the birth rate exactly equals the death rate, and your planet's overall population is at an equilibrium.
In order to prevent regional overcrowding, you must first consider the following natural limitations:
* Extent of temperate regions on the planet. Assuming your population can only thrive in certain specific conditions, the range of latitudes that lets your population survive greatly affects population distributions.
On Earth, the vast majority of the population - 88%, to be exact - is concentrated within a fairly narrow bound in the northern hemisphere, with over half living above 27 degrees N. 24
This coincides near perfectly with the North Temperate Zone, with an average temperature of 31 degrees Celsius and precipitation of 81 cm.
No one wants to live in unusually harsh conditions, so migration to/from the frigid or excessively hot regions of your planet is limited, assuming an alien physiology similar to that of humans. Since you're modelling your planet after Coruscant, which features an influx of migrants of all sorts of physiological proportions, I presume you cannot make assumptions about your alien physiology just yet, so you have to keep in mind the geography of your world before committing to a plausible solution.
* Natural disaster frequency: Regions that suffer from regular natural disasters, such as hurricanes, active volcano eruptions, etc., historically strongly affect populations, precipitating a brain drain that leads to migration elsewhere. Catastrophic once-in-a-lifetime events can exact extraordinary economic costs, all of which alter the shape of population distribution in the short term and may be hard to recover from in the long-term.
Even a planet like Coruscant is bound to suffer from natural disasters. Obviously, the sort of disaster depends strongly on the nature of the planet and its orbiting system itself: a planet without axial rotation has no day-night cycle and suffers from uneven heating leading to different natural disaster intensities, while a planet with no ozone layer orbiting a yellow star will suffer from radiation leaks.
* Resource distribution: A region unable to provide food, shelter, or security for its folks is not going to keep them for long. This ties in somewhat with the point about temperate zones, which typically come bundled with sufficient necessary resources such as food and water, but isn't necessarily connected to them. Some temperate regions may be stripped of vital resources, making them less self-sufficient in their own needs, which in turn exacts a living cost on its inhabitants that may or may not prompt migration. What constitutes a vital resource varies by region and by technology: the abundance of coal, for example, affects how likely a Victorian-era society will be to survive the winter, while coal in a purely geothermal society is no longer as relevant.
You also need to consider the following non-natural limitations:
* Economic imperative: The chief reason migration occurs is because of better economic prospects. This is often tied to the resource distribution issue, but not necessarily so: government capitals can and do become urban hubs despite not being located on, for example, a river. On planets that have moved to a currency system and engage in economic systems similar to humans, we may safely assume that economic imperative is sufficient to prompt migration.
I'm going to use economic imperative as a catch-all term for a lot of different things here: tax benefits, industry concentration, and geographic closeness to place of work. These are all economic imperatives from a migrant's perspective, and so it seems to fit.
Economic imperative can be balanced out by considering cost of living. Urban hubs exhibit higher costs of living than rural population centers, so migration between locations is unlikely to occur if the difference between net take-home pay (pay after taxes) and cost of living is identical or less than the migrant's original home. 591