Cook the pasta according to the package instructions, and set aside.
In a large skillet or dutch oven, melt 2 tablespoons of butter over medium-low heat. When butter is shimmering, add onions and cook on medium-low heat until caramelized, about 10-15 minutes. Once onions are caramelized to your liking, remove them and set aside.
In the same skillet, melt remaining butter until shimmering. Slowly add flour, 1 tablespoon at a time and whisk until a thick sauce forms. Cook for 1 - 2 minutes, then slowly stir in milk whisking continuously. Taste, and add seasoning as desired.
Slowly incorporate butternut squash, and stir until combined and heated through. Slowly add shredded cheese, and heat until melted.
Add macaroni and onions to the sauce, and cook for an additional 1 - 2 minutes or until the mixture is combined and warmed through.