Preheat the oven to 400 degrees F.
Bring a pot of water to a boil. Cook the macaroni until al dente according to the package instructions. Drain, rinse with cold water to stop the cooking process and set aside.
Carefully cut the butternut squash in half lengthwise and remove the seeds. Drizzle half of the squash with olive oil and place it on a rimmed baking sheet cut-side up (reserve the other half of the squash in the fridge for another use). Roast, watching to make sure the surface doesn't get burned (it should have some brown areas, however), until fork-tender, 20 to 25 minutes. Scrape out the flesh into a bowl and mash with a potato masher. Sprinkle with salt and pepper and set aside.
While the squash is roasting, add the onions and 2 tablespoons of the butter to a large, ovenproof skillet over low to medium-low heat. Cook the onions, stirring occasionally, until they're deep golden brown, about 20 minutes. Remove them to a plate.
In the same skillet, melt 4 tablespoons of the butter over medium-low heat. Sprinkle over the flour and whisk it to make a thin paste. Cook it for 2 minutes, then whisk in the milk. Cook, whisking gently, until slightly thick, a couple of minutes. Taste and adjust the seasonings. You'll probably want to add more salt!
Turn the heat to low and stir in the mashed butternut squash. When it is warm, stir in the cheese. If the sauce is overly thick when the cheese is melted, add a splash of milk. Keep stirring until the sauce is nice and hot, then stir in the macaroni. Taste and add more salt if needed.
Melt the remaining 2 tablespoons butter in a pan and combine it with the breadcrumbs. Sprinkle the breadcrumbs over the macaroni and bake (I do it straight in the skillet) until the crumbs are golden and the edges bubbly, about 15 minutes. Serve immediately.