Prep the squash. Heat the oven to 400°F (200°C).
Halve the spaghetti squash lengthwise and scoop out the seeds. Rub the cut sides with olive oil and season with salt and pepper.
Roast until tender. Place the squash cut-side down on a lined baking sheet. Roast for 35–45 minutes, until a fork easily pierces the flesh.
The strands should pull away with a slight crunch, not mushy.
Shred the strands. Let the squash cool for a few minutes. Use a fork to pull long strands into a large bowl. Taste and season lightly with salt if needed.
Keep warm.
Crisp the bacon. In a large skillet over medium heat, cook the diced bacon until golden and crisp, 6–8 minutes. Transfer bacon to a paper towel–lined plate, leaving 1–2 tablespoons of fat in the pan.
Sauté the garlic. Reduce the heat to low. Add minced garlic to the bacon fat and cook 30–60 seconds until fragrant.
Don’t let it brown. Turn off the heat if the pan runs too hot.
Make the sauce base. In a bowl, whisk together eggs, egg yolks, and grated Parmesan until smooth. Add several cracks of black pepper and a pinch of red pepper flakes if using.
Combine in the skillet. Add the warm squash strands and crispy bacon to the skillet with garlic.
Toss to coat in the fat. Let it sit 30 seconds so the squash heats through but isn’t sizzling.
Create the creamy finish. Remove the skillet from heat. Pour in the egg-cheese mixture, tossing quickly and constantly with tongs for 30–60 seconds.
The residual heat will thicken the sauce into a glossy coating. If it looks dry, add a splash of warm water to loosen.
Taste and adjust. Season with salt to taste (the cheese and bacon are salty, so go easy). Add more pepper.
Finish with chopped parsley and a little lemon zest if you like.
Serve immediately. Carbonara is at its best hot and silky, right after tossing.