Preheat the barbecue to medium-high, turning on just one burner for indirect cooking.
Using a knife, cut off any excess fat from the duck breasts and make shallow incisions in the skin in a grid-like pattern, taking care not to cut into the flesh. Season with salt and freshly ground pepper.
Place the duck breasts on a hot and oiled barbecue grill, on the side with the lit burner, fatty side down. Grill for 3 to 4 minutes. Turn the breasts over and continue cooking for 1-2 minutes.
Divide the zucchini, onion and, if desired, peppers between four large sheets of aluminum foil. Place the duck breasts on top of the vegetable mixture, fatty side down. Brush the duck breasts with the pesto.
Fold the aluminum foil over the preparation and pinch closed to form sealed foil packets. Place the foil packets on the hot grill on the side with the burner off. Close the lid and cook for 10 minutes.
Remove the foil packets from the barbecue. Open the packets and lay the tomato and mozzarella on top of the duck breasts.
Place the open foil packets on the barbecue grill on the side with the burner off. Close the lid and cook for 8 to 15 minutes to an internal temperature of 58 °C (137 °F) (insert a cooking thermometer into the centre of one of the breasts).