The most obvious nearby destination is Salerno. But if you've seen Paestum and Pompeii unless you're interested is the Amalfi Coast the city of Salerno is interesting but is a little short on "village charm". It is connected well by train to Naples and Rome so it ticks those boxes and I really enjoyed my time there but while it is an interesting place it's more about the things around it.
If you're looking for villages between Naples and Rome I'll have to dig into my wishlist of places I haven't gone yet and mention the Castelli Romani area. This is an area generally clustered around a Lake Albano and nature preserve area. Marino Laziale is about 35 minutes south of Rome by train and the towns of Castel Gandolfo and Ariccia are reachable by train beyond that and look charming. Some of the other towns like Lanuvio and Genzano will probably require some combo of bus and taxi probably to visit. This area is essentially along the route of the via Appia south out of Rome.
I haven't gotten here yet so I can't give you tons of practical advice but it's on my list. Check it out if it looks like the kind of thing you're looking for.
There is also Caserta which is a small city, but definitely not a village, but it is interesting and is on the train line from Naples to Rome.
Have a great trip,
=Tod