Preheat oven to 375 degrees F. Heat oil in a large saucepan over medium-low heat. Add cumin and fennel seeds; heat until seeds are fragrant, about 1 minute. Mix in cayenne pepper, lentils, onions, rice, tomato paste, and broth. Cook until no liquid remains, about 5 minutes. Cool slightly. Fold in remaining ingredients. Spoon into a nonstick 9-by-3-inch loaf pan. Bake until firm (about 45 minutes)
Slice and serve with Sun-Dried Tomato Ketchup (if desired)
In a small bowl, mix all Ketchup ingredients. Store covered in the refrigerator (keeps up to 4 months).