Preheat the oven to 400°F (gas mark 6).
Place the eggplant chunks and drained chickpeas in a bowl. Add the coriander powder, paprika, cumin powder, garlic powder, salt, and black pepper. Drizzle with 2 tablespoons of the olive oil and toss to coat everything evenly. Set aside.
Arrange the chicken legs (or spatchcocked whole chicken) and the quartered red onion in a baking tray. Rub the entire amount of harissa paste all over the chicken and onion, making sure every surface is coated.
Season the chicken with salt and pepper, then drizzle with a little more olive oil and rub it into the chicken.
Spread the chicken out evenly in the tray, then arrange the eggplant and chickpea mixture around it.
Roast in the oven uncovered for 20 minutes. After 20 minutes, remove the tray and cover it tightly with foil, then return to the oven for 30–45 minutes depending on the size of the chicken.
After 30–45 minutes, remove the foil and return the tray to the oven for another 15 minutes to let the skin crisp up and develop some colour.
Garnish with fresh cilantro and lemon wedges before serving. Enjoy!