With the rack in the middle position, preheat the oven to 350 °F (175 °C).
Peel and cut the potatoes into small cubes.
Fry the chopped onion and potatoes for a few minutes in boiling oil, then drain them when they are golden.
In a bowl, mix the eggs, potatoes and onion well. Pepper to taste.
Grease 2 cake tins. Cover each of them with 6 to 8 slices of cured ham, letting them hang over the sides. Place the cheese in the middle and make it stand on a slice.
Fill the 2 molds with the preparation. Fold the slices of raw ham inwards.
Bake for 30 minutes.
Unmould, cut into slices and serve with a green salad (optional).