Preheat the oven to 375 degrees F. Grease an 8-inch square baking dish.
Cook the pancetta in a small skillet until crispy, about 10 minutes. Set aside.
Cook the pasta according to the package directions, reducing the cooking time by 1 minute. Drain and set aside.
In a large saucepan, melt the butter over medium heat. Add the onion and a pinch of salt. Cook, stirring, until the onion is soft and translucent, 5 to 7 minutes. Stir in the nutmeg, paprika, cayenne, allspice and a few turns of pepper and cook for 2 minutes more. Increase the heat to medium-high and add the flour, whisking until combined, then cook for 1 minute. Add half the milk, whisking continuously, until thickened, about 5 minutes, then repeat with the other half of the milk. Add the Brie, Gruyere and pancetta and stir until the cheese is melted. Remove from the heat and add the pasta.
Pour the mixture into the baking dish and top it with the walnuts and Parmesan. Bake until the top is browned, about 25 minutes. Cool for 5 minutes and enjoy!