9th Gen Civic is great, if you can find one in decent shape and good maintenance history, which I did for about that price. The City is less car for the money in lots of ways, size, space, power, comfort - but is newer and might have less dubious history just because of that. Age, just like mileage, means more maintenance for you to do that the previous owner could have neglected.
Both should be pretty reliable. 9th Gen Civic has a torque converter automatic trans, inherently more reliable (when maintained properly) than the CVT City. Just make sure the radiator has coolant, rather than water, in it. That alone will save you a lot of money and time. Run away from a Civic running on water - it gets expensive fast.
The transmission fails quite catastrophically without maintenance, speaking from experience. It can only use Honda DW-1 fluid, and out of the 6.5L it can hold, only 2.7L comes out of the drain plug - making it more complicated to catch up on prior missed maintenance if needed. There's a yellow dipstick for the transmission, and it should show clean red/pink fluid at the correct level. If it does, and it's the correct fluid, and you do your timely maintenance, it's worry free for a long time.
Try not to get one with mismatched or different-looking ignition coils. New OEM ignition coils are not cheap, and you don't want a car with a kabuli special assortment of coils across the engine.