Step 1Melt half the butter in a medium pan over medium heat and add the onion and a four-fingered pinch (about one-fourth teaspoon) of salt. Cook, stirring until the onion is nicely caramelized, about 20 minutes.
Step 2In a small saucepan over medium heat, melt the remaining butter. Add the shallot and a three-finger pinch (about one-eighth teaspoon) of salt and cook until some of the water has cooked out of the butter and it has stopped foaming, about 1 minute. Add the flour, stir to mix it with the butter, and cook until the mixture has taken on a toasted aroma, a few more minutes.
Step 3Gradually whisk in the milk and stir with a flat-edged wooden spoon or spatula, to make sure the flour doesn't stick to the bottom of the pan, until the sauce comes up to a simmer and thickens, a few minutes more.
Step 4Stir in a three-finger pinch of salt, the white wine vinegar, sherry, fish sauce, dry mustard, black pepper, nutmeg and cayenne or smoked paprika.
Step 5Add the onion to the sauce and stir until heated through, 1 to 2 minutes. Transfer the sauce to a blender and process until pureed, or puree in the pan with a hand blender.
Step 6Keep the sauce warm over low heat. You should have about 2 cups soubise.
Step 1Brush the inside of a 9-by-13-inch baking dish with 1 tablespoon of the butter. Cook the pasta just until al dente, drain, then place in a large bowl.
Step 2Sprinkle half of the Comte cheese into the soubise and stir until melted. Remove from the heat and pour over the pasta. Toss the pasta to mix well and pour it into the prepared baking dish. Top with the remaining Comte. (The dish can be prepared to this point up to 3 days before serving and refrigerated tightly covered.)
Step 3Heat the oven to 425 degrees. Sprinkle Parmigiano-Reggiano over the pasta. Stir the bread crumbs into the remaining melted butter and spread over top of the casserole. Cover with aluminum foil and bake until heated through, about 30 minutes (longer if it has chilled in the refrigerator).
Step 4Remove the foil and bake until the cheese is nicely browned, about 15 minutes. Serve immediately.