Peel and finely dice the onions and garlic. Heat 1 tablespoon of oil in a saucepan and fry the onions in it until golden brown. Add garlic and minced meat and fry for about 3 minutes. Add tomato paste. Dust with flour and deglaze with broth.
Clean the chilli, cut lengthwise, wash and remove the seeds. Cut the pod into small pieces. Add chilli, bay leaf, aniseed, cinnamon and tomatoes to the minced meat. Let simmer for about 20 minutes.
In the meantime, put the beans in a sieve, rinse and drain. Peel and wash the potatoes and cut them into approx. 1 cm thick slices. Add the beans to the mince about 5 minutes before the end of the cooking time. Grate cheese coarsely.
Spread oil on an ovenproof dish (approx. 2 litres capacity), line the bottom with approx. 1/3 of the potatoes. Spread about 1/2 chili con carne on top and sprinkle with half of the cheese. Put another third of the potatoes on top.
Spread with the remaining chili con carne, cover with the remaining potatoes and sprinkle with remaining cheese. Bake in the preheated oven (electric cooker: 175 °C/ convection oven: 150 °C/ gas: see manufacturer) for about 1 hour.
Remove from the oven, arrange and garnish with chillies and parsley if desired.