Place all the pesto ingredients in a blender. Blend on high until there are no large chunks. If the pesto seems really thick, add another tablespoon of water and blend again.
Preheat your oven to 400˚F (200˚C). Butter the baking dish or ramekins.
Mix six tablespoons of the pesto with the spinach. Spread evenly over the bottom of the baking dish. Pour the cream evenly over the spinach. Bake for eight minutes. Remove the dish from the oven.
Gently crack the eggs into the dish and place pieces of ham around the egg. Bake for 8 to 14 minutes, until the whites are just cooked and the yolks are still runny (it will take less time in a cast-iron pan). There should still be a bit of jiggle when you shake the pan. Let cool for five minutes.
While the eggs are cooling, toss the tomatoes, shallot, and any leftover pesto together. After five minutes, spoon the tomato mixture over the eggs and and sprinkle with the shaved cheese, fleur de sel, and pepper. If desired, serve with a handful of arugula and toast.