Heat oil in a saucepan then stir in onion. Saute until just translucent then stir in garlic. After about 30 seconds, stir in tomatoes, wine and pepper. Lower heat then let simmer until reduced by half. Stir in oregano and thyme.
In a frying pan, fry sweet potato, potato and capsicum in batches, with about 2 tablespoons per batch. Then drain on a paper towel lined plate.
In a large baking dish, add some of the tomato sauce then layer, potato, sweet potato, more sauce then the capsicum. Pour over remaining sauce then bake in preheated oven for 20 minutes. Serve with your favourite crusty bread.