Cut the pumpkin, zucchini, bell pepper and onion into cubes. Fry everything one after the other with a little oil in a pan and place in a large saucepan. Add vinegar and sugar.
Cook for 20 minutes, then add the cayenne pepper and cook for another 10 minutes. Pour hot into jars and close.