Melt 2 tablespoons butter in a saucepan or microwave (for the microwave, use 30-second intervals). In a bowl, toss the sourdough cubes with the melted butter and set aside.
Fry the bacon in a large, heavy-bottomed skillet over medium heat with a few tablespoons of water—this helps the fat to render as the bacon cooks, and avoids scorching the pan. When it’s nice and crispy, transfer to a paper towel-lined plate. Drain the bacon grease in a separate, heat-safe container, reserving 1 tablespoon in the skillet and 2 tablespoons in a separate bowl. (If the pan looks too hot, take it off the heat for a minute or two before moving on to the next step.)
Keeping the heat at medium to medium-low, add the butternut squash and a splash of water to the skillet. Cook until the squash is soft and fork tender, about 15 to 18 minutes. Season with a pinch of salt and freshly ground black pepper, to taste. Transfer to a separate bowl and set aside.
While the squash cooks, bring a pot of water to a boil and salt generously. Cook the pasta very al dente, about 1 to 2 minutes less than the package instructions. Drain the pasta and set aside, reserving 1 cup of the pasta water (to help thin the sauce, if needed).
Meanwhile, in a large, heavy-bottomed pot, heat 2 tablespoons butter and 2 tablespoons bacon grease over medium heat. Once the butter is melted and bubbling, add the flour and whisk together to form a thick, smooth roux. Keep whisking over low heat until the roux takes on a light brown color and gives off a slightly nutty smell (you shouldn’t be able to smell the raw flour), about 2 to 5 minutes.
Add the heavy cream and milk to the large pot with roux and whisk to combine until fully incorporated. Bring to a simmer over medium heat, whisking occasionally, until the mixture bubbles and thickens. Turn off the heat and whisk in 3 cups sharp yellow cheddar and 1 1/2 cups Gruyère until fully melted and incorporated. Whisk in the grated nutmeg, cayenne, pinch of salt, and 1 teaspoon black pepper. Give the cheese sauce a taste to make sure the seasoning is right where you want it.
Add the cooked pasta, bacon, and butternut squash to the cheese sauce and gently incorporate. If the sauce is looking a little thick, add a splash of pasta water to loosen things up, repeating as necessary. (If your pot isn’t big enough you can do this in the casserole dish.)
Pour the macaroni and cheese mixture into a large casserole dish (I used a 10x10-inch dish). Sprinkle 1/2 cup cheddar, 1/2 cup gruyere, and the buttered bread cubes over top. Bake the dish until the cheese is browned and bubbling, about 30 minutes. If it’s not browned after 30 minutes, turn on the broiler and check every minute or so (every oven is different!) until it’s browned.
Let the mac and cheese cool for about 5 to 10 minutes before serving.
Erin Alexander is the Assistant Editor of Partner Content at Food52, covering pop culture, travel, foods of the internet, and all things #sponsored. Formerly at Men’s Journal, Men’s Fitness, Us Weekly, and Hearst, she currently lives in New York City.