Preheat the oven to 400 degrees F. Coat a sheet pan with cooking spray.
Place the eggplant on the sheet pan in a single layer. Drizzle with 3 tablespoons of the olive oil and season with salt and pepper to taste.
Bake for 25-30 minutes or until eggplant is tender and browned.
While the eggplant is in the oven, warm the remaining 2 tablespoons of olive oil in a large pan over medium heat.
Add the red onion, red bell pepper and celery to the pan. Cook for 5-7 minutes or until vegetables are tender.
Add the garlic and cook for 30 seconds.
Add the olives, capers, raisins, brown sugar, red wine vinegar, red pepper flakes and tomatoes. Stir to combine.
Add the cooked eggplant to the pan. Stir and bring to a simmer.
Cook for 10-15 minutes or until mixture has thickened and has a jam-like consistency. Stir in the pine nuts and chopped herbs. Season with salt and pepper to taste.
Serve hot, at room temperature, or you can refrigerate it and serve it cold. Caponata will stay fresh in the fridge for up to 5 days.