Cut the onion into thin slices and FRY it in oil over low heat, add the pumpkin cut into CUBES keeping a few pieces with the skin, pour in 3 tablespoons of water, rosemary, oregano, salt, cook 15 minutes in a covered pot.
Cook the pasta al dente (keep some cooking water), FRY the pasta and ragù over high heat with some pasta water, with the heat off, add the Parmesan cheese or toasted almonds (or both).
Cut the pumpkin with the skin into slices (finger-thick), place them in the oiled baking pan, season with salt, garlic cut into slices and rosemary sprigs. After 15 minutes, turn them over and cook for another 5 minutes.