Adjust oven rack to middle position and preheat oven to 180°C. Fill a medium pot with water and bring to a boil.
Heat the butter in a large cast-iron pan over high heat until foaming, then add the mushrooms. Cook, stirring occasionally, until the mushrooms release their liquid and it boils off, about 12 minutes.
Add the ham and cook, stirring occasionally, until mushrooms brown, about 6 additional minutes. Add the oregano and cook until fragrant, about 30 seconds. Season to taste with salt and pepper and set aside.
Lightly butter the inside of 1 gratin dish. Add the cream, then add 2/3 of the mushroom mixture, and sprinkle with 2/3 of the cheese. Carefully add the Irvine’s Eggs and season with salt and pepper. Top eggs with remaining mushroom mixture and sprinkle with remaining cheese.
Open the oven and place a rimmed baking pan on the rack. Make a water bath - carefully fill the pan with boiling water until the water level reaches about halfway up the sides of the pan. Carefully add the egg dish to the water bath, close the oven door and bake until egg whites are firm but yolks are still runny, about 12 minutes, or to taste. Sprinkle with fresh oregano and serve.