01 -
Set oven temperature to 400°F (200°C).
02 -
Cut spaghetti squash lengthwise and scoop out seeds and fibrous strands.
03 -
Brush cut sides with 2 tablespoons melted butter and season generously with salt and black pepper.
04 -
Place squash halves cut-side down on a parchment-lined baking sheet and roast 45 to 60 minutes until flesh is tender when pierced with a fork.
05 -
Allow squash to cool sufficiently, then use a fork to separate flesh into spaghetti-like strands. Reserve.
06 -
In a large saucepan over medium heat, melt remaining 2 tablespoons butter.
07 -
Add chopped onion and cook until translucent, approximately 5 to 7 minutes. Stir in garlic and cook for 1 minute until fragrant.
08 -
Sprinkle flour over onion and garlic mixture, stirring constantly for 1 to 2 minutes to form a roux.
09 -
Gradually whisk in milk ensuring no lumps form, stirring until the mixture is smooth.
10 -
Bring sauce to a simmer over medium heat, then reduce heat and cook for 5 to 7 minutes until slightly thickened, stirring frequently.
11 -
Add salt, black pepper, and nutmeg, adjusting seasoning to taste.
12 -
Remove sauce from heat and stir in 3/4 cup each of Gruyere and cheddar cheeses and 1/4 cup Parmesan until melted and incorporated.
13 -
Gently fold shredded spaghetti squash into the cheese sauce until well combined.
14 -
Pour the squash and cheese mixture into a greased 9 by 13-inch (23 by 33 cm) baking dish.
15 -
In a small bowl, mix remaining 1/4 cup each of Gruyere, cheddar, Parmesan cheeses with panko breadcrumbs.
16 -
Evenly sprinkle the cheese and breadcrumb mixture over the surface of the squash mixture.
17 -
Bake in preheated oven for 20 to 25 minutes until topping is golden and bubbly.
18 -
Remove from oven and allow to rest 5 to 10 minutes before serving.
19 -
Optionally garnish with chopped fresh parsley and serve warm.