To prepare tomato sauce: Coat a 4-quart saucepan with a thin film of olive oil. Heat over medium-high heat. Add onion with some salt, black pepper and red pepper flakes and cook until golden, about 4 minutes. Stir in garlic and basil and cook for 30 seconds. Stir in tomatoes, breaking them up as they go into the pan. Bring sauce to a lively bubble and cook, uncovered, until thick, 10 to 15 minutes, stirring often. Taste for seasoning, cover and set aside for 15 to 20 minutes (or refrigerate up to 24 hours).
To prepare custard: Preheat oven to 325 degrees. While sauce cooks, oil an 8-inch square ceramic baking dish. Cover bottom of dish completely with bread slices. In a large bowl, whisk eggs, salt, pepper, nutmeg, half-and-half (or heavy cream), milk and cheese. Pour half of custard over bread and let it soak in for 10 minutes.
Sprinkle with 3 tablespoons of feta cheese and half of the slices of fresh cheese. Tuck in half of basil leaves.
Cover with tomato sauce. Pour in rest of custard, scatter olives over custard, and push tomatoes and remaining basil into custard. Cover with remaining slices of fresh cheese and sprinkle with remaining feta cheese.
Cover with foil and bake 45 minutes. Increase heat to 375 degrees and bake for 25 to 30 minutes. Remove aluminum foil and bake until an instant-read thermometer inserted in center of pudding reads 200 to 210 degrees, about 20 minutes. Remove from oven and rest at room temperature for 15 minutes. Serve hot or just warm.
Nutrition information per each of 6 servings: