Finely chop the onion and garlic, sauté in olive oil, add the cayenne, cumin, and oregano, and let it cook for a bit.
Now mix in the minced meat and let it brown nicely, drain excess fat if necessary, deglaze with the tomatoes and let it simmer gently for 10 minutes with the lid on.
Cut the eggplants, fennel, and zucchinis into cubes, sauté them separately in some olive oil, and season with pepper and salt, set aside.
Peel the potatoes, slice them thinly with a mandoline.
If you don't have a mandoline, boil the slices first for 2 minutes in salted water, then drain.
Make the béchamel sauce, let the butter foam, add flour, let it cook for a bit, then deglaze with half of the cold milk, whisk well until there are no lumps, add the rest of the milk and a large portion of the cheese, let it come to a boil, season with pepper, salt, and nutmeg.
Make layers of sautéed vegetables, tomato sauce, potatoes, and béchamel sauce.
For the last layer, add the béchamel sauce and sprinkle with the remaining grated cheese.
Bake further in the oven for 35 minutes at 185°C.