Heat oil in small skillet over medium heat. Add the onion and garlic and cook, stirring, until softened, about 5 minutes. Stir in the brandy, paprika, thyme, and cayenne and cook for 2 minutes longer. Set aside.
In the food processor, combine the lentils, sunflower seeds, and parsley and pulse to mix. Add the onion mixture and process until blended but not pureed; leave some texture. Transfer the mixture into a bowl and stir in the flour, blending well. Taste to adjust the seasonings, then spoon into the prepared pan.
Bake until firm, about 30 minutes. Serve warm or cool.