Prep the squash: Trim patty pan squash and cut into even 1-inch pieces. Toss with olive oil, salt, pepper, garlic powder, and red pepper flakes if using.
Air fry: Preheat the air fryer to 390°F (200°C) for 3 minutes.
Arrange squash in a single layer. Cook for 10–12 minutes, shaking the basket halfway, until golden-brown with tender centers. Thicker pieces may need a minute or two more.
Cook the couscous: Bring broth (or water) to a boil with olive oil or butter and a pinch of salt.
Stir in couscous, cover, and remove from heat. Let sit for 5 minutes, then fluff with a fork to separate grains.
Make the pesto: In a food processor, pulse basil, nuts, Parmesan, and garlic until finely chopped. With the motor running, stream in olive oil until smooth but not runny.
Add lemon juice, salt, and pepper to taste. Adjust texture with more oil or a splash of water.
Toss the couscous: While still warm, mix couscous with 2–3 tablespoons of pesto to coat. Taste and add more pesto if you like it saucier.
Assemble the salad: In a large bowl, combine pesto couscous, air-fried patty pan, cherry tomatoes, and red onion.
Add nuts and cheese if using. Toss gently.
Finish and serve: Squeeze fresh lemon over the top and add a grind of black pepper. Serve warm or at room temperature with extra pesto on the side.