Many varieties of maize are grown for dried, fully mature seed, which is eaten as a grain, but sweet corn is picked before the seeds mature fully, before its sugars convert back into starch. This is why fresh corn must be eaten fairly quickly after harvest, before it degrades and becomes starchy.
The most notable capsaicinoid about peppers is called capsaicin, a crystalline substance found almost entirely in the pithy flesh that holds the seeds in place inside the chili. The seeds and skin contain very little, if any, capsaicin. When eaten, capsaicin is detected by heat receptors in the mouth, and the brain responds as though something hot (in terms of temperature) has been consumed.