Toast 1/4 cup of the walnuts in a large skillet over medium heat until fragrant, about 4 to 5 minutes. Transfer to a food processor. Add basil, Parmesan cheese, lemon juice and zest, garlic, 1/2 tsp. of the salt, 1/4 tsp. black pepper, and crushed red pepper flakes to the food processor. Begin blending while gradually streaming in 1/2 cup olive oil; blend until smooth. Set aside.
Cook pasta according to package instructions in a large pot of salted water until al dente. Reserve 1 cup pasta cooking water before draining.
While pasta cooks, heat remaining 2 Tbsp. olive oil in a large skillet over medium-high. Add zucchini; cook 6 to 7 minutes, stirring occasionally, until golden brown. Transfer to a bowl. Reduce heat to medium and add 1 Tbsp. butter. Once melted, add mushrooms and shallots. Cook 5 to 6 minutes, stirring occasionally, until mushrooms are tender and golden brown. Combine mushrooms with zucchini, and season with remaining 1/2 tsp. salt and 1/4 tsp. black pepper.
Add remaining 1 Tbsp. butter and 1/2 cup chopped walnuts to the skillet. Cook 5 minutes, until the butter is browned and walnuts are toasted. Season with a pinch of salt, and transfer to a small bowl.
Add zucchini and mushroom mixture to pot with pasta, and stir in pesto. Gradually stream in reserved 1 cup of pasta water, stirring constantly, until sauce becomes glossy and begins clinging to noodles.
Divide pasta between each of 6 plates. Garnish with dollops of burrata or additional Parmesan cheese, if desired. Sprinkle toasted walnuts overtop.