Preheat your oven to 400°F (200°C). Spread the eggplant cubes on a baking sheet, drizzle with half of the olive oil, and season with salt and pepper. Roast for 20-25 minutes, or until the eggplant is tender and golden brown, stirring halfway through the cooking time.
While the eggplant roasts, heat the remaining olive oil in a large skillet over medium heat. Add the onion, celery, and red bell pepper, cooking until they are softened, about 10 minutes.
Add the minced garlic to the skillet and cook for another minute until fragrant.
Stir in the crushed tomatoes, red wine vinegar, capers, green olives, golden raisins, toasted pine nuts, sugar, and dried oregano. Bring the mixture to a simmer.
Once the eggplant is done roasting, add it to the skillet with the tomato mixture. Stir to combine all the ingredients well.
Simmer the caponata for 15 minutes, allowing the flavors to meld together. Adjust the seasoning with salt and pepper to taste.
Garnish with fresh basil leaves before serving. The caponata can be served warm, at room temperature, or cold.