Preheat the oven to 400 degrees F. Place the onions
and unpeeled garlic skin-side down in a roasting tray. Roast
until they are soft and golden, 30 minutes.
Bring a large pot of salted water to a boil, then lower to a simmer. Meanwhile, in a food processor, blend together the 1/3 stick softened butter, shallots, salt, pepper, eggs and parsley into a smooth paste. Transfer to a bowl and beat in the flour with a wooden spoon.
Place a colander over the simmering water. Pour in the batter and use a spatula to push the batter through the holes, making little dumplings.
Cook, 2 minutes, then drain through a clean colander. Peel off the skins from the onions and cut the roots off so the onions can be separated into petals.
Add the remaining 1/3 stick butter to a large skillet over medium heat. Melt, then lower the heat and add the chopped mixed herbs and onion petals.
Cut the hard ends off the roasted garlic cloves and squeeze the garlic out of its skins into the skillet, discarding the skins.
When the butter begins to brown, take the skillet off the heat and toss in the spaetzle. Season to taste and serve immediately with the cheese scattered on top.