Cut the eggplant and peppers into cubes, then the garlic and onion, but in smaller pieces (if you prefer, you can even grate the garlic).
Put everything in a form that can go in the oven.
Add the olives (already chopped and pitted), the raisins and the capers.
Mix very well and season with salt and pepper.
Drizzle with oil and red wine vinegar.
Take it to the preheated oven (180 degrees) and leave for approximately 50 minutes.
Remove the caponata from the oven and transfer to a bowl. Add the chestnuts and parsley, let cool before serving.