Place the raisins in a bowl and pour in the red wine vinegar. Set aside.
In an oil-free pan, toast the pistachio until lightly browned and aromatic. Set aside to cool.
Set a wide frying pan on the stove over medium-low heat and heat the olive oil.
Spread the diced onion on the bottom of the pan and cook without disturbing for a few minutes. Stir.
Add the garlic and oregano. Continue cooking with occasional stirring until the edges of the onion bits start to brown.
Throw in the sliced celery. Sprinkle in salt and pepper. Cook, stirring, for a minute.
Add the diced eggplants. Sprinkle in more salt and pepper. Stir. Cover the pan and cook for about five minutes.
Next, add the bell peppers and tomatoes. Sprinkle in salt and pepper once more. Stir. Cover the pan again and cook for five minutes.
Remove the pan from the heat. Pour in the red wine vinegar with the raisins. Stir. Taste. If the flavors seem unbalanced, the dish might benefit from more salt and pepper.
Add the pistachio and stir.
Cover the pan loosely (a vent will prevent the vegetables from continuing to cook in the residual heat) and allow the flavors of the caponata to develop for about 30 minutes.
Sprinkle sliced basil over the caponata and serve.