Pre-heat the oven to 400°F.
If using squash, halve the squash lengthwise and place cut-side down on baking sheets. Roast for about 1 hour or until tender, then turn cut-side up and shred the squash into spaghetti-like strands with the tines of a fork; season with salt and pepper.
Melt the butter over low heat with pepper when you remove the spaghetti squash from the oven. Add some starchy cooking water (if using pasta) or stock (if using squash) and the cheeses. Toss with the pasta or dumplings or spoon over the squash.