Peel the onion and garlic and dice them finely. Wash the tomatoes, cut a lid off each and hollow them out with a tablespoon. Cut the lid and the hollowed out flesh into small pieces.
Heat the oil in a large frying pan. Fry the spaetzle in it while turning. Fry onion and garlic briefly. Stir in spinach, except for a few leaves for sprinkling, and pieces of tomato. Cover and cook for about 2 minutes. Season with salt, pepper and nutmeg.
Add stock and wine to the pan. Place hollowed out tomatoes with the opening facing upwards in the spinach noodles. Carefully beat the eggs one after the other and let them slide into the tomatoes.
Sprinkle the spaetzle pan with cheese and cook covered for about 7 minutes until the eggs have set. Sprinkle the rest of the spinach and roasted onions on top.