Clean the pumpkin (remove seeds) and cut the pumpkin into fine slices. Cut the bacon into fine cubes. Mix pumpkin, bacon, garlic, chili flakes and 2 tbsp. oil well. Spread oil on an ovenproof wide dish or a fat pan and spread the pumpkin mixture on top. Bake in a preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: see manufacturer) for 20-25 minutes
Cook the pasta in boiling salted water according to the instructions on the packet. Wash the beet leaves and drain well. Remove half of the soft garlic cloves from the skin and crush them. Mix with lemon juice, sugar, some salt and 4 tablespoons of oil. Drain the spaghetti, put it back into the pot and mix it with the pumpkin mixture, the garlic-lemon oil and the beet leaves