Season the aubergine chunks with salt and leave to sweat for 10 minutes. Meanwhile, chop the remaining vegetables into medium-sized chunks, then finely chop the onion and garlic.
Heat the oil in a large frying pan, then cook the aubergine for 10–15 minutes until soft. Remove and set aside.
In the same pan, fry the onion until soft. Then add the garlic, celery, courgette and oregano. Cook for 10 minutes. Return the aubergine to the pan.
Add the halved and tinned tomatoes, wine, vinegar, sugar and a splash of water. Bring to the boil, then cover and simmer for 30 minutes.
Preheat the oven to 200°C.
Dry-roast the fennel seeds for 30 seconds until fragrant, then grind them to a powder.
Soak the breadcrumbs in a little water until softened. Mix them with the pork, eggs, chilli flakes, garlic, fennel powder, salt and pepper. Combine gently to keep the meat tender.
Fry a small piece to check the seasoning, and when happy continue to shape the mixture into evenly sized meatballs. Place them on a lined baking tray and roast for 10 minutes.
Add the meatballs to the caponata and spoon over the sauce to coat them. Cover and simmer for 10 minutes.
Dry-roast the pine nuts until they are lightly golden.
Stir the olives and capers through the caponata. Serve topped with pine nuts, basil and a drizzle of olive oil.