Heat the oven to 180ºC fan/gas 6. Toss the squash on a baking tray with 1 tbsp of the oil and some salt. Roast for 20-25 minutes or until tender.
Meanwhile, tip the rice and lentils into a sieve and rinse under cold water for a few minutes or until the water turns from cloudy to clear.
Heat the remaining oil in a saucepan, add the onion and a pinch of salt and fry over a medium heat for 8-10 minutes. Add the ginger, garlic and spices, then cook for 1 minute. Stir in the lentils, rice and stock. Bring to a simmer and cook over a low-medium heat, covered, for 25 minutes, stirring regularly. Add a splash more water if it starts to thicken too much.
Stir the spinach into the rice and let it wilt for a couple of minutes. Season to taste, then share among bowls, top with the squash/pumpkin and, if you like, serve with yogurt, chilli flakes and lime wedges for squeezing.