1 cup thinly sliced shallots
1/2 cup apple cider vinegar
1/2 cup water
2 teaspoons granulated sugar
2 teaspoons kosher salt, divided
1/4 cup unsalted butter
1/4 cup all-purpose flour
5 cups whole milk, warmed
12 ounces Gruyère cheese, grated (about 3 cups)
3/4 teaspoon black pepper
1/4 teaspoon freshly grated nutmeg
16 ounces cavatappi pasta, cooked according to pkg. directions for al dente
6 ounces raclette cheese, grated (about 1 1/2 cups)
Chopped fresh chives, for garnish
Preheat oven to 375°F. Combine shallots, vinegar, 1/2 cup water, sugar, and 1 teaspoon salt in a microwavable bowl. Microwave on HIGH 3 minutes. Let cool 15 minutes; drain.
While shallots cool, melt butter in a Dutch oven over medium. Whisk in flour; cook, stirring constantly, until light golden brown, about 2 minutes. Gradually whisk in warm milk until combined. Increase heat to medium-high; bring to a boil. Reduce heat to medium-low; simmer, whisking often, until thickened, 6 to 8 minutes. Remove from heat. Add Gruyère, pepper, nutmeg, and remaining 1 teaspoon salt; stir until cheese melts. Stir in pasta and 3/4 cup pickled shallots.
Transfer pasta mixture to a 13- x 9-inch baking dish. Sprinkle remaining pickled shallots over top of pasta; sprinkle evenly with raclette cheese. Bake in preheated oven until top is golden brown, about 35 minutes. Garnish with chives.