Clean, wash and thinly slice the zucchini. Peel, wash and thinly slice the potatoes. Peel garlic and cut in half. Finely chop half the garlic. Grate cheese finely.
Mix cream and chopped garlic and season vigorously with salt, pepper and nutmeg. Tarteform(23 cm Ø above, 19 cm below) with butter and halved garlic. Put zucchini and potato slices and half of the grated cheese alternately in the tin.
Pour cream over it and sprinkle with half of the remaining grated cheese. Season with salt and pepper and bake in a preheated oven (electric cooker: 175 °C/ convection oven: 150 °C/ gas: level 2) for 40-50 minutes.
Cut the ham into strips. Sprinkle ham and cheese on top about 8 minutes before the end of the cooking time. Remove and garnish with basil leaves.