Preheat the oven to 350 degrees.
Heat the olive oil gently in a large saucepan, add onion and garlic, and fry for five minutes until the onions are translucent.
Add lentils and stir, then add vegetable stock. Bring to a boil, then reduce heat and simmer for 25 minutes.
Add the peppers, basil, apple, white wine, and canned tomatoes and mix well.
Transfer the mixture to an oven-proof 9-by-13 baking dish and sprinkle cheese on top. Cook in oven for 30 minutes.
Serve immediately, or freeze remaining portions in individual servings.