Not only do pumpkins have a long growing season (meaning they occupy fields that could be used for growing other crops - food), a large number of chemicals go into their production. Check out this report on the Pesticide Action Network's website to get an idea of the type and quantity of pesticides used.
One shameful thing about this is that pumpkins are actually high in nutritional value, rich in vitamins A, C, and E, fiber, and minerals, such as copper and calcium. Pumpkins have a lot to offer, yet most end up carved up and then sent to landfill to (maybe) rot.
I cannot imagine what this type of food waste looks like to those in countries with high rates of malnutrition.