Heat the oven to 180°C (350°F/Gas 4). Cut the squash in half lengthways and remove the seeds. Slice into 1.5 cm (⅝ inch) wedges and arrange in a baking tray. Whisk together 3 tablespoons of the olive oil, the cumin, paprika and salt and pepper. Pour over the squash and turn to coat. Add the garlic cloves and roast for about 45 minutes, or until the squash is tender. Squeeze the garlic flesh out of the skins, mash with a fork and set aside.
Meanwhile, heat 3 tablespoons of the olive oil in a pan and add the onions and fennel. Stir to coat in the oil, reduce the heat to medium–low and cook for 8 minutes, or until tender. Stir in the lentils and add the stock, bay leaves and thyme. Simmer gently for about 25 minutes, or until al dente. Drain, reserving any cooking liquor left in the pan, and set aside.
While the lentils are cooking, make the dressing by whisking together the remaining olive oil, the hazelnut oil, vinegar and salt and pepper.
Stir the mashed garlic and most of the dressing into the lentils. Gently warm through over a low heat. Add a little of the reserved cooking liquid so that the lentils are bathed in a lovely sauce. Taste for seasoning. Stir through the spinach until wilted, then remove from the heat.
To serve, tip the lentils onto a serving platter and top with the pumpkin. Drizzle over the remaining vinaigrette and serve immediately.