Fry the minced meat until crumbly, after two minutes roughly dice the onions and add diced chilies, season with pepper, thyme and oregano. Put everything in a large baking dish.
Layer alternately rows of potato and courgette slices of 3 courgettes over the minced meat. Scatter parmesan and a little salt on top. Place sprigs of rosemary on top.
Pour boiling water over the tomatoes and peel them. Peel a zucchini, dice it finely and simmer in a saucepan until soft, add the tomatoes and season with salt. When the vegetables are soft, puree them. Mix in some grated cheese. Pour everything over the potatoes and zucchini. Scatter the rest of the cheese on top. Bake at 180 ° for approx. 30 minutes.