Preheat the oven to 400°F (200°C).
Place pumpkin, onion, and walnuts on a large parchment-lined baking tray. Drizzle with 3 tbsp olive oil and maple syrup. Toss well by hand to coat.
Sprinkle with chili flakes and ¾ tsp salt. Toss again, then spread everything out in a single layer—avoid overcrowding.
Roast for 30 minutes, tossing once at the 20-minute mark, until the pumpkin is browned and tender.
Remove from the oven and gently toss. Transfer to a platter or bowl.
Top with crumbled feta, parsley, and minced chili before serving, if using.