Beat the eggs with 4 tbsp sugar in a bowl with a whisk. Add the milk and vanillas.
Cut off the top part of the pumpkin and remove its seeds and soft insides. Sprinkle it generously with flour, shake off the excess.
Caramelize 3-4 tbsp sugar to a light caramel. Pour it into the pumpkin. Also pour in the milk with the eggs. Put the pumpkin's top back on and carefully move it to a large pot. Pour in cold water, enough to reach up to 1 finger width below the cut top.
Put the pot in a preheated 302°F (150 °C) oven with the fan on and bake about 2 hours. The water in the pot must not come to a boil. Keep an eye on the oven and lower the heat when needed.
Take the cooked pumpkin very carefully out of the water. Wait for it to cool completely before cutting it.