Begin the recipe by preheating the oven to 375 degrees F. and grab a small baking sheet.
Make the sauce in a small saucepan over medium heat. Melt 1 tablespoon of butter. Once the butter has completely melted and is foamy, add the ½ tablespoon all-purpose flour. Whisk constantly for about 30 seconds.
Slowly add the ½ cup milk and continue whisking until the mixture is thick and smooth, about 1 minute.
Add the ⅛ teaspoon salt, ⅛ teaspoon ground black pepper, ⅛ teaspoon ground nutmeg, and 1 teaspoon Dijon mustard. Stir to combine and adjust the heat to low.
Prepare the sandwiches on a small baking sheet. Spread 1 tablespoon of butter onto one side of each of the 4 slices of bread. Place the bread butter side down on the baking sheet.
On the unbuttered side of each slice of bread, evenly spread a layer of sauce on top and then add 3 slices of ham to each slice of bread.
Add ¼ cup of shredded Gruyere cheese over the ham. Top with the remaining 4 slices of bread. Top each sandwich evenly with a spread of 1 tablespoon of butter divided among each sandwich.
Place the baking sheet into the oven on the center rack for 5 to 6 minutes, until the bread had lightly browned and the cheese is melted. Carefully remove from the overn.
Evenly top each sandwich with the rest of the sauce, spreading it before topping it with ¼ cup of shredded Gruyere cheese on each sandwich. Adjust the oven to broil and add the baking sheet back to the oven. Broil until the cheese is melted, bubbly, and begins to brown, about 3 to 4 minutes. Carefully remove from the oven.
Using a large skillet over medium heat, spray with cooking spray and carefully crack the 4 large eggs into the skillet. Reduce the heat to medium-low and cook the eggs until all of the whites are completely set and the yolks begin to thicken, about 5 minutes.
Using a spatula, carefully transfer 1 egg on top of each sandwich. Serve warm and enjoy!