Preheat oven to 220C or 425F (that’s 200C or 400F for fan forced ovens).
Pour the tomato passata into the base of a baking dish large enough to hold the aubergine halves in a single layer. Score the cut side of the aubergine in a chunky cris cross pattern. Slice a think cheek off the round side of the aubergine so it will sit flat in the dish. Place aubergine in the dish and top with anchovies if using and garlic slices. Drizzle over olive oil.
Bake until meltingly tender, about 50 minutes to an hour. Serve warm or hot with a generous dollup of pesto on top.