Preheat oven to 350 F.
Bring 4 cups salted water to a boil. Add rice and lentils, and let it simmer on low heat till the lentils are done, about 20 - 30 minutes. Drain immediately.
While the rice and lentils are cooking, you can begin to get the keema ready. Wash ground meat and drain.
Heat oil in a saucepan, and brown sliced onion on medium heat for about 10 minutes.
Add crushed ginger and garlic, and fry for a few seconds.
Add the ground spices and fry on medium heat for 1 minute. Add a splash of water to deglaze the pan if needed.
Turn heat up, add ground meat and salt. Fry the ground meat till it is cooked through and no longer pink.
Add ½ cup water, cover saucepan and let ground meat (keema at this point) cook on medium-low heat for about 15 minutes.
Remove lid, increase heat to high and stir well for about 5 minutes. Remove from heat.
For the tadka (tempering), in a small frying pan, fry the onions till they are a medium brown. This step is optional
In an about 4 quart, oven-proof pot, begin to layer the rice, tempered onions and keema. Start with the rice, and top with onions, and a thin layer of keema and chopped eggs (if using). Keep layering.
Cover and put in the oven for about 10 minutes.