Preheat the broiler.
Heat the oil in a 10-inch cast iron or oven-proof skillet over medium-high heat. Add the onion, carrots and celery, and season with salt and pepper. Cook, stirring occasionally, until the vegetables are tender, about 5 minutes.
Add the mushrooms, and season with more salt and pepper. Cook, stirring occasionally, until the mushrooms are softened, about 5 minutes. Add the tomato paste, garlic and thyme, and cook, stirring, until everything smells heavenly, about 1-2 minutes.
Stir in the lentils, and season with salt and pepper. Pour in the wine and bring to a boil, scraping up any bits from the bottom of the pan. Cook until the wine is almost completely evaporated, about 1-2 minutes. Add the broth and bring to a boil. Cook until slightly thickened, about 1 minute longer. Remove the pan from the heat, and stir in the sherry vinegar, sugar and truffle oil (to taste). Taste and season with salt and pepper as needed.
Spoon the cauliflower puree over the filling and spread in an even layer. Sprinkle with the cheese. Broil on the top rack until bubbling and golden, about 5 minutes. Let cool 5 minutes before serving.