When can't I use a squash in a recipe which calls for pumpkin? I am not even sure what the difference between squash and pumpkin is - the botanists seem to not recognize it at all, and cooking sources on the Internet are contradictory. I tend to not pay attention and use whatever is available for any recipe which calls for pumpkin (I don't think I've ever tried recipes which specify squash). But recently, I had a talk in chat where derobert suggested that squash may not function in all situation. 

When can I continue using squash instead of pumpkin, and when should I expect a difference? And what would the difference be, just a change in taste, or the dish failing completely?
I agree that, in general, other squashes can be substituted for pumpkin. I have tried some different types of squashes but obviously there are many more that I haven't tried.

There are definitely differences in flavor- these will obviously change a dish but not ruin it.

The biggest differences I have run into are water content and texture.

When roasting squash the cooking time might need to be adjusted to obtain a product with the needed consistency. Using pie as an example- I have had to adjust my cooking to avoid a runny pie filling. Obviously in some recipes, such as soup, this won't be as important.

Some squash, such as spaghetti, have stringy textures that would be odd where smooth pumpkin is expected.