1. Peel the pumpkin and potatoes. Cut them into pieces after removing the seeds (from the squash).
2. Put them in a large pot, fill with water and cook for 30 minutes covered.
3. Meanwhile, peel and finely chop the onion. Put it in a bowl with the ground meat.
4. Finely chop the parsley and add it to the bowl, along with a drizzle of olive oil, salt, and pepper. Mix everything well, using a spoon or kneading with your hands if necessary to create a homogeneous mixture.
5. Drain the potatoes and pumpkin, then mash them. Season with salt, pepper, and mix.
6. Spread the ground meat at the bottom of a gratin dish, then cover with the mashed potatoes. Sprinkle with grated cheese if desired, or breadcrumbs.
7. Bake for 30 minutes at 350°F (180°C).