Cook pasta according to package directions. If desired, add zucchini to pot during last few minutes to cook it.
While pasta is cooking, prepare pesto. Place all of the ingredients, except for the lemon juice and olive oil into the bowl of a food processor. Pulse a few times, then process until finely chopped. With the motor running, add the lemon juice and olive oil through the feed hole. Process until smooth. Set aside or refrigerate until ready to use. (Can be made up to 3-4 days in advance.)
Drain pasta, reserving 1/2 cup of the cooking water, and place back in the pot. Add the sliced zucchini and pesto. Toss to coat. Add a little of the reserved pasta water, if needed, to thin the sauce.
Taste and add more salt, if needed. Transfer to a large serving bowl and top with the mozzarella, extra pistachios, and herb leaves. Serve warm, at room temperature, or chilled.