Do city bikes and hybrid bikes have different frame geometries that cause a performance difference?
There is no formal definition of city bike or hybrid bike so this question is hard to answer, especially as 'hybrid' can mean many very different  styles, some of which are slower than some 'city' bikes.
This is a more recognized style, the 'Dutch bike'

The rider is very upright, and there is an enclosed chainstay and mudguards to allow normal clothes to stay clean. Up to about 10mph the upright position doesn't slow you down because wind resistance is minimal at low speeds.
The Dutch bike may also be very heavy. On flat ground this is almost irrelevant, but it is unhelpful in hilly areas.
The gearing is typically an 3-speed hubgear. Whereas derailleurs are up to about 96% efficient, the IGH will be less efficient, however this is typically over 90%. While the drag is perceptible, this is not significant.

In many cases the slow speed will be down to the choice of tyres. A classic 'city' or Dutch bike should not get punctures on the 2km ride back from the pub, and so heavy, puncture-resistant tyres are much more important than shaving 5s off the journey time.
If you fit a Dutch style bike with racing tyres then on flat ground at 10mph then it should not be noticeably harder to pedal than a racing bike. However air resistance grows with the cube of speed, so at 20mph you will be creating a large amount of air resistance.
The most important factor in resistance is not particularly the 'aero' of the bike, but the rider's position. The term used is CdA, which is drag * area.
If you compare the Dutch bike above to this time trial cyclist

then the area exposed to the wind is much greater. In addition, it is obvious that a slippery lycra-style suit bent over parallel to the direction of travel, and an aero helmet is going to disrupt air flow much less than an almost completely upright cyclist on a Dutch bike.
Refer here: https://www.gribble.org/cycling/power_v_speed.html
Basically if you are happy to travel around 10-12mph or so then a very upright bike is suitable. If you want to travel sometimes at 20mph then an upright bike is a big waste of effort.
It is possible to get a lower position on a flat bar bike with a different handle bar. The Jones H-Bar is one design that allows a crouched position on a flat bar bike.

In addition other modifications such as a lowered stem could help with this.
In terms of your question then the geometry of a city bike is going to be much further from a road bike, so not suitable for say 'leaning into corners', and not very 'fast' in handling, but this isn't really what is slowing you down, which is overwhelmingly tyre choice at lower speeds and then body position and clothing at higher speeds.
If you just want 'low maintenance', then remember that something like a Rohloff is extremely efficient as much as derailleurs, very low maintenance, and can be fitted to racing-style bikes.
This is more a 'gravel' or 'adventure' posture than racing, but it should be faster than your flat bar hybrid (Shand Stoater w/ Rohloff IGH)

It's very expensive of course, but if you have money then you can have your bike built how you want - don't expect to find a cheap racing bike fitted with a cheap 3-speed hub, but if you want a low maintenance bike with IGH and a faster speed than bolt-upright Dutch style, then looking at something like a touring bike might be helpful.