There are no trains to Esanatoglia, which is a very small town. The closest train station is Matelica, which is about 7 km from Esanatoglia; you can connect in Fabriano. However, it would probably be better, depending on exactly where in Esanatoglia you're going, to take a bus from Fabriano to Esanatoglia. The schedule is here:
These buses don't run on Sundays or holidays. The buses marked "Sc" operate only when school is in session, and those marked "nSc" only when school is not in session.
You really should have a car if you'll be spending any amount of time in this area.