Preheat the oven to 400°F and hard-boil the eggs. Brown the meat in some olive oil in a pan over medium heat and add the chopped onions, salt, and pepper. Once the onions are glassy, remove the pan from the heat and let cool.
Peel the hard-boiled eggs and cut them in half. Remove the egg yolks and add them to the ground beef.
Melt the butter and flour in a saucepan over low heat, stir in the milk, season with salt, pepper, and nutmeg, and let simmer. Once the sauce has thickened, remove the saucepan from the heat.
Add a ladle of béchamel sauce to the ground beef and mix well.
Fill each egg with 1 tbsp of the ground beef mixture.
Place the deviled eggs in a casserole dish and pour the rest of the béchamel sauce on top, followed by the tomato sauce and mozzarella cheese. Cook for 10 minutes.