Preheat the oven to 180°C.
Heat olive oil in a pan, add pumpkin, cover, and cook until tender for up to one hour.
Season the pumpkin with paprika, nutmeg, salt, and pepper.
Stir in ricotta cheese over heat then remove and let the mixture stand covered.
Melt butter in a small saucepan without browning.
Gradually whisk in flour and cook for 5 minutes to form a roux.
Slowly add 350ml of milk, stirring constantly until the béchamel is smooth and thick.
Layer pasta and pumpkin mixture three times in a dish, ending with a pasta layer.
Pour 150ml of milk over the top layer of pasta.
Bake for 10 minutes then spread the béchamel sauce over the top.
Bake for 20 minutes until the milk is absorbed and the pasta is crisp.
Sprinkle with parmesan and bake for a few more minutes until golden.