City parks are usually sprayed as well.
There is plenty of good areas to forage but most are outside the city the exception being trees that are "ornamental". You can find them in people's yards if you know what to look for.
Knock on the door and ask politely if you can (carefully!) harvest the seed, nuts or fruit. Usually they will say yes as they regard the mast as useless stuff they have to clean up every year.
I'd never go foraging in either place, but the concern that would keep me out of there would be because of the petrochemicals and other toxins from the trains and road vehicles, or up here in the northland, the chemicals they put on the roads in the winter. Maybe the people that live in cities develop some kind of immunity to that crap though. As for me, since I have a choice, I'd no more live where all those chemicals are in the air I'd breathe everyday than I'd go foraging in road ditches and railroad right of ways.