If you don't have (or can't spare) a cast-iron skillet, sauté the apples and onions in any heavy skillet and transfer to a buttered 8x8" glass dish for baking.
When I traveled to Sicily, I must have eaten no fewer than ten versions of eggplant caponata, and I never got sick of it! I also learned about the agrodolce-or sweet and sour-flavor profile that's so predominant...