Slice the eggplants into ½-inch thick slices. Place them on paper towels and salt them on both sides. Let them rest for 20 minutes.
Let the potatoes cool slightly, then cut them into ½-inch thick slices. Dice the onion and garlic. In a large pan, heat some olive oil and sauté them with the ground beef for about 4 minutes.
Add the crushed tomatoes. Let everything simmer for another 4 minutes. Add the bay leaf and season with salt, pepper, and cinnamon to taste. Remove the pan from heat.
Gently squeeze out any excess moisture from the eggplant slices, pat them dry, and fry them on both sides in a pan until golden brown.
Preheat the oven to 350°F.
Melt the butter in a saucepan, add the flour, and cook briefly. Gradually pour in the milk and let everything thicken while stirring constantly. Season with salt and pepper. Remove the saucepan from the heat, add a tablespoon of grated cheese, and stir in the eggs.
Grease the casserole dish with a drizzle of olive oil. Alternate layers of half the potato slices and half the eggplant slices. Spread the ground beef mixture evenly on top and layer the remaining slices on top. Finally, pour the sauce over everything and sprinkle with the remaining cheese.
Bake for 35 minutes.