Rinse the rice in cold water until the water runs clear. Soak the rice in water for 20-30 minutes, then drain.
In a large, deep pot or Dutch oven, heat the vegetable oil over medium heat. Add the sliced onions and cook until they become golden and caramelized. Remove half of the caramelized onions and set them aside for garnish.
Add the minced garlic, ground turmeric, ground cumin, and ground cinnamon to the remaining onions in the pot. Cook for a minute or so until fragrant.
Place the chicken or lamb pieces in the pot and brown them on all sides.
Add the chopped tomatoes and continue to cook for a few more minutes until they start to break down and release their juices.
Add the sliced eggplants and carrots to the pot, arranging them in an even layer.
Layer the drained rice on top of the vegetables and meat.
Season the rice with salt and pepper and then add enough water or chicken/vegetable broth to cover the rice. The liquid should be about 1 inch above the rice.
Bring the mixture to a boil, then reduce the heat to low, cover the pot, and let it simmer for about 30-40 minutes, or until the rice is cooked and the liquid is absorbed. Be careful not to stir during this process.
Once the Maqluba is done, remove it from the heat and allow it to sit for 10-15 minutes before serving. This resting time helps to set the layers.
To serve, place a large platter or serving dish on top of the pot, and carefully invert the Maqluba onto the platter, so the rice is on the bottom and the vegetables and meat are on top.
Garnish with the reserved caramelized onions, toasted pine nuts or almonds, and chopped fresh herbs.
Serve hot with yogurt or tahini sauce on the side.