Preheat oven to 400 degrees.
Prepare a rimmed baking sheet with aluminum foil and spray with nonstick cooking spray.
Toss cubed butternut squash with 1 tablespoon olive oil and season as desired with salt and pepper.
Bake in the oven for 30 to 40 minutes (depending on the size of the squash) or until the squash is softened. Tip: During the last 5 minutes of baking time, add the walnuts to one corner of the baking sheet to toast lightly.
Meanwhile, cook spaghetti according to package instructions.
Drain and return to pot. Toss with lemon juice.
In a large skillet, heat 1 tablespoon over medium-high heat.
Stir in garlic and red pepper flakes.
Add the heavy cream and bring to a simmer. Stir in spinach.
Add parmesan and cooked squash.
Pour sauce over spaghetti and toss to combine.
Serve topped with chopped walnuts, additional grated Parmesan, and lemon zest if desired.