If you eat too much Spaghetti Squash at a time then yes you can get diarrhea from eating the spaghetti squash.
Spaghetti Squash as well as many other types of squash and even Pumpkins contain lots of fiber and when you eat too much Fiber based foods then you poop more often and can even have diarrhea as a result.
If you're having diarrhea from eating spaghetti squash then either you have digestive issues and the spaghetti squash should be avoided or you're just eating too much spaghetti squash and should cut back on the amount you eat.