Memph
Chicago quickly drops off past the 20k/sq-mi range too, which is basically typical rowhouse density. It only has 88,000 people living in >50k/sq-mi census tracts, mostly stretched out along the northern waterfront. Amsterdam has almost twice as many at 162,330.
Amsterdam isn't even that dense by European standards, although Swiss cities are probably similar. The densest cities are in southern Europe, ex Valencia has about 800,000 residents over 20k/sq-mi, and 400,000 residents living at 50k/sq-mi densities and it's not even a big city. https://chartingtransport.com/2015/11/26/comparing-the-densi...
But back to the original point... Chicago has fairly dense areas within a short commute of downtown - but those mostly have 2-3 flats and bigger apartments, and the few single family homes are quite expensive. For more affordable SFHs with a decent school and crime situation, I think you'd have to go to neighbourhoods that would be considered "suburbs" by European standards even if they're within city limits.
San Francisco is even more expense, the better neighbourhoods have SFHs at $2m+. More far flung areas like Sunset would be more like $1m which is still not exactly cheap and it's getting to be a long commute (40-50min each way by transit).
In Toronto the Financial District doesn't go completely dead, but the 4million square foot underground mall shuts down, and it's just a few ground level businesses that stay open. It's still more lively at night than the typical suburb, but not as bustling as the adjacent neighbourhoods or as the Financial District during the day when there 200,000 office workers there (vs just a few thousand tourists and residents within walking distance at night). From what I heard it's not as dead at night as the Chicago loop.