Peel onion and garlic. Dice onion and chop garlic finely. Wash the tomatoes. Wash the pumpkin, cut into thick slices and remove the seeds. Coarsely grate pumpkin with skin. Wash oregano, shake dry and chop the leaves.
Cook the pasta in boiling salted water according to the instructions on the packet. Heat 2 tablespoons of oil in a frying pan. Fry the pumpkin, onion and garlic thoroughly. Add tomatoes and fry briefly. Add broth, ketchup and oregano (up to 1 tbsp.), bring to the boil and braise covered for about 5 minutes.
Drain the pasta and let it drain. Pluck the ham finely. Season pumpkin and tomato ragout with salt and pepper and mix with the noodles. Spread ham on top and sprinkle with oregano.