Preheat oven to 400°F.
Halve the squash lengthwise and place cut-side down on baking sheets. Roast 1 hour or until tender, turn cut-side up and shred the squash into spaghetti-like strands with tines of a fork, season with salt and pepper.
Roast squash until tender, about 45-50 minutes.
Defrost spinach and place in clean kitchen towel. Wring out all liquid then separate spinach with your fingertips to loosen it up.
Toast walnuts in the oven or a small pan until fragrant and crispy-brown at edges; cool.
Place stock in a food processor or blender and add spinach, parsley, shallot, garlic and toasted walnuts. Pulse into pesto sauce.
Heat olive oil, 4 turns of the pan, in a large skillet over medium heat, add pesto and stir 2-3 minutes to warm and combine flavors. Season the sauce with salt, pepper and nutmeg. Add pasta or gnocchi and some starchy liquid to pan to combine or toss with roasted spaghetti squash right in squash shell. Combine some Parmigiano-Reggino cheese a small handful at a time into the squash to taste; serve warm.