01 - Preheat oven to 400°F. Line a baking sheet with parchment paper.
02 - Cut spaghetti squash in half lengthwise and scoop out seeds. Drizzle cut sides with 1 tablespoon olive oil and sprinkle with salt and pepper.
03 - Place squash halves cut-side down on prepared baking sheet. Roast for 35-40 minutes until flesh is tender and easily shredded with a fork.
04 - Heat remaining 1 tablespoon olive oil and butter in skillet over medium heat. Add onion and cook until soft and translucent, about 5 minutes. Add garlic and cook 1 minute more.
05 - Remove squash from oven and cool slightly. Use fork to scrape flesh into spaghetti-like strands. Place strands in large mixing bowl.
06 - Add cooked onion and garlic, sour cream, milk, half the Gruyère, half the Parmesan, nutmeg, salt, and pepper to bowl. Mix until well combined.
07 - Transfer mixture to greased 2-quart baking dish. Top with remaining Gruyère and Parmesan.
08 - Reduce oven temperature to 375°F. Bake for 20-25 minutes until top is golden and bubbly.
09 - Garnish with chopped parsley before serving, if desired.