Preheat the oven to 200°C (392°F).
Place baking paper in the cake form. Lightly roll out the puff pastry so that it fits the round baking form. The corners should be about 3-4 cm high. Prick the pastry 3-4 times with a fork. Place baking paper on the pastry and pour in beans. Bake for 15 minutes.
While the pastry is baking, chop the bacon into small cubes and fry it in a pan until golden brown. Place it on a towel to remove access oil.
Slice the leek in half and chop it into small pieces. Wash the mushrooms and chop them into slices that are about 1 cm long and 0.3-0.5 cm wide. Heat a pan, add butter, and fry the leek with mushrooms for several minutes until they become slightly brown.
In a separate bowl, pour milk, add eggs, and a bit of pepper. Whisk until the consistency becomes fluffy. Add half of the grated cheese and lightly whisk.
When the pastry is done cooking, take it out, remove the beans and baking paper. Add the mushrooms, leek, and pour in half of the egg mixture. Add the bacon, broccoli florets, and pour in the leftover egg mixture. On top, sprinkle the remaining cheese and put it in the oven for 20 minutes. The top should rise a bit and turn golden brown.
After 20 minutes, check with a toothpick if the inside is cooked. If it is not, cook for an additional 3-5 minutes.