Preheat the oven to 400°F (200°C). Toss the butternut squash cubes with olive oil and a pinch of salt. Spread evenly on a baking sheet and roast for 20 minutes or until tender.
While the squash is roasting, cook the spaghetti according to package instructions. Reserve 1 cup of the pasta cooking water and drain the rest.
In a large skillet over medium heat, cook the pancetta until crispy. Add the minced garlic and cook for an additional minute.
In a bowl, whisk together the egg yolks, grated Parmesan cheese, and black pepper.
Add the roasted squash and cooked spaghetti to the skillet with pancetta. Remove from heat.
Quickly mix in the egg and cheese mixture, stirring continuously to coat the pasta without scrambling the eggs. Add reserved pasta water as needed to achieve desired creaminess.
Serve immediately with extra Parmesan and black pepper if desired.