Heat oven to 400°F and butter a 9 x 13-inch baking dish.
Sift together flour and salt in the bowl of a stand mixer fitted with a paddle attachment. In a separate bowl, whisk the eggs. Make a well in the center of the flour and add the eggs and milk. Mix on low for 10 minutes, or until bubbles start to appear. (If the dough is too runny, add more flour. If the dough is too stiff, add more milk.) Stop the mixer and use a spoon to stretch the dough. If small holes appear, it’s ready.
Bring 2 quarts of lightly salted water to a boil in a large pot. Reduce to a simmer. Fill a spätzle press or a potato ricer with dough. Press the dough into the water in batches. Cook for 2 to 3 minutes. When done, noodles will float to the top. Use a slotted spoon to transfer the noodles to a colander. Repeat until remaining dough is used.
Add one-third noodles to the bottom of the baking dish, followed by one-third raclette, then one-third caramelized onions. Repeat twice, sprinkling each layer with salt. Bake for 10 to 15 minutes, or until the cheese on top is melted.
Garnish with crumbled bacon and serve immediately.