Preheat oven to 325°F Fill a 9X13-inch baking pan with 1 inch of water. Set whole pumpkins in pan and bake 40 to 45 minutes, until blade of a knife penetrates flesh easily. (or microwave: With tip of a sharp knife, poke holes in each pumpkin. Set pumpkins in a microwave-safe plastic wrap, and microwave on high for 7 minutes. Rotate pumpkins and microwave 4 to 5 minutes longer.) Let cool, then carefully remove tops to make a lid. Scoop out seeds.
While pumpkins are baking, in a large saucepan, heat oil over medium-high heat. Add onion and cook, stirring occasionally, until golden, 2 to 3 minutes. Stir in tomato sauce, sugar, cumin, paprika, and cinnamon. Add lentils and broth. Cover and cook until lentils are tender, 40 to 45 minutes. Drain into a colander. Season lentils with salt and cayenne.
Fill hollowed pumpkins with equal amounts of hot lentil mixture. Cover each pumpkin with its lid and serve at once.
In the past, I've also baked a pretty medium-sized pumpkin at 325 (It takes longer, depending on size) and used it as a serving bowl.