01 - Preheat the oven to 375°F. Lightly grease four individual ramekins or one medium baking dish with cooking spray or butter.
02 - Melt butter in a saucepan over medium heat. Whisk in flour and cook for 1 minute to create a roux. Slowly pour in milk while whisking constantly until the mixture thickens. Stir in Gruyère cheese, nutmeg, salt, and pepper until smooth and well combined. Remove from heat.
03 - Heat a skillet over medium-high heat. Add spinach and sauté briefly until just wilted, approximately 2-3 minutes. Remove from heat and set aside.
04 - Place one slice of puff pastry or toasted brioche in the bottom of each ramekin. Layer with sautéed spinach, zucchini slices, tomato, and ham or mushrooms in that order.
05 - Spoon the prepared cheese sauce evenly over the layered vegetables and ham in each ramekin.
06 - Create a shallow well in the center of each ramekin using a spoon. Carefully crack one egg into each well. Lightly season the eggs with salt and pepper.
07 - Place ramekins in the preheated oven and bake for 20-25 minutes, or until egg whites are fully set but yolks remain runny. Adjust cooking time slightly for firmer yolks if preferred.
08 - Remove from oven and let rest for 2-3 minutes. Sprinkle with chopped fresh chives or parsley before serving warm.