Preheat the oven to 400°F.
Grease a 9x9-inch square baking dish with butter.
In a saucepan, add water and bring to a boil. In a large colander over the sink, place the spinach and pour the boiled water over it. Use the back of a large spoon to squeeze out as much water as possible. Place it in the bottom of your baking dish, spreading evenly to cover the bottom.
Next, sprinkle over the chopped tomato and onion.
Whisk together the 8 eggs, cheese, 1 tablespoon chives, and season well with salt and pepper. Pour evenly over the vegetables in the bottom of the dish, followed by the ham slices on top, covering the egg mixture to the edges.
Pipe the mashed potato over the ham slices in a decorative pattern, then, using the back of a spoon, make four 'wells' in the top of the casserole.
Bake in the oven for 1 hour, then remove and add the remaining 4 eggs to the wells.
Place back into the oven for 5 minutes or until the eggs are cooked.
Season the eggs and sprinkle the remaining chives on top.
Let cool for a few minutes before serving.
