In a large oven-safe skillet, heat the olive oil over medium heat. Once hot, add the thinly sliced onions along with a big pinch of kosher salt. Stir to combine, ensuring the onions are coated in the oil. This will help them soften and caramelize.
Cook the onions over medium heat, stirring often. After about 10 to 15 minutes, they should start to become tender. You want them to turn a beautiful golden color, becoming sweet and caramelized.
Once the onions are softened, reduce the heat to low or medium-low. Continue cooking the onions for an additional 60 to 90 minutes. Stir them often, and if they begin to brown too much, add a splash of water to keep them hydrated. You’re aiming for a deep caramel color.
While the onions are caramelizing, preheat your oven to 375 degrees F. In another pot, bring salted water to a boil and cook the short cut pasta according to the package directions until al dente. Drain and set aside.
When the onions reach a golden and caramelized state, transfer them to a plate. This step is important because you will want to keep them aside while making your cheese sauce.
In the same skillet, add the unsalted butter. Once melted, whisk in the all-purpose flour to create a roux. Let it cook for 2 to 3 minutes until it turns golden and starts to smell nutty.
Slowly stream in the milk, whisking constantly to avoid lumps. Keep stirring until the mixture thickens. This creamy base is what makes the dish so heavenly.
Add in the freshly ground nutmeg, then gradually stir in most of the grated gruyere cheese until it melts and combines smoothly into the sauce.
Stir in about three-quarters of the caramelized onions and the cooked pasta. Toss everything together until each piece of pasta is coated in that luscious cheese sauce.
Transfer this delicious mixture into a baking dish. Sprinkle the remaining cheese and onions on top, followed by the seasoned bread crumbs for that perfect crunch.
Bake in the preheated oven for 25 to 30 minutes, or until golden and bubbly. The top should be crispy while the inside remains creamy.
Once out of the oven, garnish with fresh thyme before serving. Trust me, this adds a beautiful freshness!