As an occasional work cyclist in Edinburgh and previously Cambridge: it doesn't make that much difference. It's nicer to have more gears to get a decent speed, but not being able to slip off is an advantage to 3-speeds.
Overall bike design makes more difference. Dutch bike >> MTB with comfort fittings > regular MTB > racing bike. By "comfort fittings" I mean things like chain guards and mudguards and a suitable saddle.
> Dutch bike >> MTB with comfort fittings > regular MTB > racing bike
I feel like you're missing one type, the 80s touring bike. The one that looks like a racing bike but with a longer wheelbase, mudguards, racks and thicker tyres.
It is more comfortable in the city than a racing bike, but also IMO better than a mountain bike with curved handlebars, thinner tyres and a lighter frame. They're also dirt cheap.