Cut spaghetti squash in half long way, place on a baking sheet and bake for one hour. Once tender, shred the sides of the squash into a large bowl by scraping the squash with a fork, and save the shells. Set aside.
Place a medium saucepan over medium low heat and add in the oil and onions. Stir the onions and caramelize low and slow until sweet and golden brown- about 40 minutes. Add in the garlic and sauté for an additional one to two minutes, or until fragrant. Add a pinch each of salt and pepper. Set aside.
Combine the squash and broth in a medium saucepan over medium-high heat. Cover and cook over medium heat until thawed and very tender. Puree the cooked squash, 1/2 of the cooked caramelized onions and the residual broth until smooth in a food processor or blender.
Transfer back to the pot over medium low heat and add in the milk, nutmeg, 170 grams (about 1 1/2 cups) of the shredded cheddar and 28 grams (about 1/4 cup) of the parmigiano reggiano cheese. Gently stir until fully melted, then season with salt and pepper, to taste. Remove from the heat.
Add the cooked spaghetti squash and reserved caramelized onions to the sauce and stir until all of the squash noodles are well coated.
Transfer half of the mixture to the reserved spaghetti squash halves. Top with the reserved 28 grams (about 1/4 cup) of grated cheddar cheese and then add the remaining mac and cheese. Top with the final 28 grams (1/4 cup) of cheddar and 28 grams (1/4 cup) of parmesan cheese.
Bake for ten to 15 minutes or until it bubbles and the cheese melts.