Thank you, that will help a lot! The reason I haven't used ShareData is I don't need to transfer data between mods or save it in the savegame, so there's no need for the extra overhead. I did some testing and found the save operation to be relatively time-intensive.
Basically what I'm saying about the avoid thing is to take your original idea (blue line) and reduce the discontinuity from 99% to 100% with a smooth transition (green line). After all, the excellent reason you pointed out to use weights is to reduce discontinuities in food distribution.
The only two effects of avoid status are preventing the population from increasing, and changes the automatic governor's priorities. A player can still micro their cities and citizens for normal food intake everywhere, while turning off avoid the 1 turn a city needs to grow. It would allow full control over the maritime system to quickly grow newly-settled cities in a way the AI wouldn't know how to use.
You rightly pointed out that food has more of an effect in a smaller city, it gives more population points per turn. Targeting food to small cities is my concern (not the science city). Allowing players to send 30-60 or more food to a new city would allow that city (or several) to grow at a fantastic rate. This would shift the balance of some other things in the game. For example, it would make the Collective Rule policy less useful for expanding empires (where cities start at 2

).
Beyond that, I've found that whenever dealing with extremes in games, creative players can usually find exploits you and I might not ever think of.
The reason I feel applying the quadratic to the "avoid" stage instead of the "food" stage is reducing food quadratically would impact small empires with ~5 cities more than large empires with ~50 cities, somewhat the opposite of what I'm trying to achieve. It'd also reduce the value of each additional maritime ally more than the existing effect of diminishing returns (5 to 10 is more important than 50 to 55).
One thing I could do is reduce the total food based on how many cities are on avoid, before that food is distributed at all. I'm not certain this would be the best option though, since it'd add a penalty to checking 'avoid' that might be undesirable.