Bring a large pot of salted water to a boil and cook the egg spaetzle for 5 minutes until tender.
While the spaetzle cooks, cut the onion and ham into small pieces and drain the mushrooms.
Heat the sunflower oil in a large pan over medium-high heat. Add the onion and cook for 3 minutes until translucent. Add the ham and mushrooms, stir well, and cook for 2 more minutes.
Drain the spaetzle and transfer to a large bowl. Add the ham and mushroom mixture, stir in half of the grated cheese, then add the crème fraîche and mix well.
Transfer the mixture to a baking dish and spread evenly. Scatter the remaining grated cheese over the top.
Bake for 20 minutes until the cheese is golden brown.
Sprinkle a pinch of oregano over the top and serve.