Peel and finely chop the onions and garlic cloves. Pick the thyme leaves off their sprigs and finely chop the coriander stalks (keep the leaves aside to garnish before serving).
Pour 1 tbsp oil into a large pan and bring up to a medium temperature. Slide in the onions and garlic and stir through the coriander stalks, thyme and 1 tbsp ras al hanut. Sprinkle in a little salt and pepper and fry for 5 mins, stirring occasionally till softened.
While the veg fry, halve each squash and use a spoon to scoop out the seeds. Peel them and chop the flesh into 1cm chunks. Roughly chop the tomatoes into small pieces.
Tip the squash and tomatoes into the pan. Add the red lentils and barley. Crumble in the stock cube and stir in 1 ltr boiling water.
Pop on a lid. Bring the stew to a boil, then reduce to a simmer for 25 mins or till the squash is tender.
While the stew simmers, pull the leaves and silks off the sweetcorn cobs. Stand the cobs upright on a chopping board. Run a knife down the sides to slice off the kernels. Stir the sweetcorn kernels into the stew and simmer for a further 5 mins.
Grate in the lemon zest and squeeze in the juice from 1 half. Ladle the stew into bowls and finish with a good crack of pepper, the coriander leaves and wedges of the remaining lemon for squeezing.