To make the marinade, put all the ingredients into a food processor and pulse to make a paste. Put the lamb in a baking tray and cover with the paste. Cover and refrigerate for 12–24 hours.
To make the pickled onions, simmer the vinegars, sugar and peppercorns in a small saucepan over a medium heat until the sugar has dissolved. Put the onions into a clean bowl and pour over the hot vinegar. Set aside.
Preheat the oven to 160C/140C Fan/Gas 3.
To make the escalivada, put the aubergines, garlic and thyme into a roasting tin, drizzle with a good glug of olive oil and toss together. Roast for 1 hour.
Preheat the grill to high, add the peppers and grill until blackened all over. Transfer to a plastic food bag, seal and leave to steam for 10 minutes to loosen the skins.
Carefully remove the skins and cores from the peppers and discard. Cut the peppers into strips and add to the aubergines. Roast for a further 15–20 minutes, or until the aubergines are really tender.
Remove the roasting tray from the oven and allow to cool. Cut the aubergines into strips and add to a bowl. Squeeze the garlic from their skins and add to the bowl. Add the peppers, onions, lemon juice, parsley and a good glug of olive oil. Toss everything together, season and set aside.
Increase the oven temperature to 220C/200C Fan/Gas 7. Cook the lamb racks on the hottest part of the grill for 3 minutes on each side. Transfer to the oven 15–20 minutes. Allow the lamb to rest for 10 minutes.
To serve, slice the racks into chops and divide between four plates. Serve with the pickled onions and the escalivada.