I see what you mean now. And yes, I can see the problems with my suggestions. Allow me to make modifications. First, forget randomization. All bonuses will be the same from game to game, from civ to civ, and from city to city. The only exception is if we want some bonuses to be unique to a certain civilizations.
As for the bonuses themselves, you are right. There is nothing to stop players from specializing their cities all in the same way, such as, for example, turning all science districts in all my cities into super science districts, while keeping all other types of districts undeveloped by specialists. The way to resolve that problem might lie in making the bonuses conditional on trade routes, resources, or geography. For example, all of industrial districts bonuses are dependent on the hammers already being produced on the worked terrains. The first upgrade bonus will increase output by 25 percent. The second upgrade bonus will increase output by another 25 percent. A city that is located on mostly grassland without forests or mines will not find it worth their while to invest specialists in industrial districts. Another example maybe harbor. All harbor bonuses are tied to the trade routes. The higher number of trade routes, the higher the bonuses. But since we only have limited number of trade routes, not all cities can specialize in harbor.
The harbour bonus idea is an interesting one. Seems overpowered said like that, but it looks really great and indeed make for specialized cities.
Concerning improving the adjacency bonus in order to encourage specialisation. I did think of that (not with your mechanic however) but I am not sure it is a good enough answer. First if the adjacency bonus get too significant, good starts (like mountain area) may become way too powerful. There is already enough luck involved in the game. Second a lot of district tends to get the same bonus, wherever the city you are in. If no mountains around, campus are almost always +1/+2, same for theatre districts. CH can often reach +5 or more, but their main use if for the trade route and GMP, the gold yield is not so much significant. So it will be significant only for HS and IZ, maybe for Campus when you have a lucky starts.
For the adjacency bonuses to be a real incentive toward specialisation, a big rebalancing must be done and yet still, it may create overly powerful or pointless starts.