Preheat the oven to 180C.
Place the aubergine slices on a tray and sprinkle salt on them and leave for 10 minutes to draw out some of the liquid. Pat dry the slices with paper towel to remove the salt and sprinkle chermoula spice over them.
In a large saucepan, heat half the oil and cook the aubergine in batches for 2 minutes on each side. Remove from the pan and set aside. Add the marrow slices to the same pan and half-cook before setting aside as well.
Pour half of the homemade tomato relish into a casserole dish and spread it out. Layer the aubergine slices upright on the side of the dish, followed by the marrows, tomato slices, mozzarella slices and finally the basil leaves, reserving some for a garnish.
Continue layering until you have used up all the ingredients and the dish is full, then spoon the remaining tomato relish on top. Finish off with a sprinkle of grated mozzarella cheese.
Bake in the oven for 25 minutes. Then turn the grill on for 5 minutes to slightly brown the cheese.
Remove from the oven and leave to rest for at least 5 minutes before cutting and serving. Garnish with basil leaves and enjoy!