Preheat the oven to 190°C (375°F).
Cut the chicken in half along the backbone. Set one half aside for another meal, and place the remaining half on a large baking tray.
Slice the butternut squash into thin half-moons and the red onions into wedges. Lightly smash the garlic cloves.
In a small bowl, mix together the olive oil, Moroccan spice blend, lemon juice, salt and pepper.
Slice the lemon and lay the slices in the centre of the roasting tray. Place the chicken on top. Arrange the squash, onion, and garlic around the chicken. Tuck in the bay leaves and chilli pepper (if using). Brush the chicken and vegetables with the spiced oil, making sure everything is evenly coated.
Roast in the oven for 25–30 minutes, then remove the tray and baste the chicken with the pan juices. Turn the vegetables for even cooking.
Scatter the cherry tomatoes around the chicken and return to the oven.
Roast for another 15 minutes, until the chicken is golden brown, the squash is tender, and everything smells amazing.
Let the chicken rest for a few minutes before serving. Serve warm with salad, couscous or flatbread.