Fill a pan with 3 cups of water and heat on high until boiling. Add the lentils and turn down the heat to medium-high. Cook for about 20 minutes, until the lentils are soft, then strain.
Add the lentils, garlic, eggs, seasonings, parmesan cheese, breadcrumbs, salt, and pepper to a food processor. Turn the food processor on and mix until smooth.
Once the mixture is smooth, add the onion and, if using, the fennel seeds and red pepper flakes. Pulse about 5 times until those ingredients are incorporated. Be sure not to over-pulse, because you want to notice when you bite through those ingredients instead of having those flavors all combined.
Roll the mixture into small 1-inch balls and place on a plate. Heat a frying pan to medium heat and add roughly 2 tablespoons of oil. Then, place about half of the meatballs into the pan without overcrowding. Roll meatballs around in the pan until they are all covered in oil. Let the meatballs fry for about 10 minutes, shaking the pan every couple of minutes to allow the other sides of the meatballs to brown. Place the cooked meatballs into a bowl, and repeat these steps with the other half of the meatballs.
Serve with sauce on top of spaghetti, or in a meatball marinara sandwich!