Heat the oil in a frying pan over a medium heat and fry the onion with a good pinch of salt for 15 mins until soft and translucent. Add the pancetta and cook for 5 mins more, then add the garlic and thyme, and cook for 2 mins. Remove from the heat and leave to cool for 15 mins.
Tip the mince into a large bowl. Massage with your hands for 5 mins to tenderise the meat, then add the cooled onion mix, the breadcrumbs and egg yolk. Season generously. Divide evenly into four, weighing for accuracy, if you like. Mix the cheddar and mozzarella together. Form the beef portions into patties, patting each into a 10cm round. Divide the cheese mixture into four, and, in your hands, form each portion into a firm ball, then press into a roughly 4cm disc. Working one at a time, put a cheese disc into the centre of a beef patty, then bring the meat around the cheese to cover. Lightly pat with the palm of your hand to flatten slightly, then chill, covered, for at least 30 mins or up to 48 hrs.
Make the sauce by whizzing the mayonnaise, mustard and herbs together in a small food processor. Stir through the gherkins, then cover and chill until ready to use.
Light the barbecue. When the flames have died down, grill the burgers on each side for 4-5 mins until charred (if you don’t have a barbecue, see tip, below). Wrap individually in foil and leave on the barbecue for 5-7 mins so the cheese centre melts.
Grill the buns, cut-side down, for 1-2 mins until toasted. Spread all the cut sides with the sauce, then fill with the beef patties, lettuce, tomatoes and crispy onions.