Can I use pumpkin for spaghetti squash?
No, pumpkin will not shred the way spaghetti squash does. That's pretty much distinctive to the spaghetti squash, and I don't know of any substitute.

The flavor is generically squashy, so if you were to serve a sauce on top of a slice of pumpkin or cubed pumpkin it would taste just fine. Not the same, but similar enough to be edible. The texture will be different, and to really get the dish the way the recipe designer intended, you'd need to lay your hands on a spaghetti squash. 

So, if the sauce has a really interesting flavor you want to try, go ahead and prepare it, then serve it with pumpkin prepared any way you like. (The easiest way is to cut it into slices or chunks and roast at 350F/170C until soft; there are lots and lots of variations on that basic idea.) If you like it enough to try again, maybe you'll locate a spaghetti squash; they're easy to grow and you may be able to push your local grocer into carrying them.