01 - Preheat the oven to 375°F. Lightly grease four individual ramekins or a medium baking dish with butter or cooking spray.
02 - Melt butter in a saucepan over medium heat. Whisk in flour and cook for 1 minute until bubbly. Gradually add milk while whisking constantly to prevent lumps. Continue whisking until sauce thickens and bubbles. Stir in Gruyère cheese, nutmeg, salt, and pepper until cheese melts completely. Remove from heat.
03 - Heat a skillet over medium-high heat. Add spinach and sauté briefly until just wilted, about 1-2 minutes. Remove from heat and set aside.
04 - Place a slice of puff pastry or toasted brioche in the bottom of each ramekin. Layer sautéed spinach, zucchini slices, tomato, and ham or mushrooms evenly among the ramekins.
05 - Spoon prepared cheese sauce evenly over the layered vegetables and ham in each ramekin.
06 - Create a shallow well in the center of each ramekin. Crack one egg into each well. Lightly season eggs with salt and pepper.
07 - Bake for 20-25 minutes until egg whites are set but yolks remain slightly runny. Adjust baking time by 3-5 minutes longer for firmer yolks.
08 - Remove from oven and immediately garnish with fresh chopped chives or parsley. Serve hot while yolks remain creamy.