Heat the oven: Preheat to 425°F (220°C). Line a large baking sheet with parchment for easy cleanup.
Prep the veggies: Toss tomatoes, zucchini, bell pepper, red onion, and garlic with 2 to 3 tablespoons olive oil, a generous pinch of salt, and black pepper. Spread in an even layer.
Roast until caramelized: Roast for 18–22 minutes, stirring once.
You want the tomatoes blistered, the zucchini golden, and the onions tender with some char on the edges.
Cook the gnocchi: While the veggies roast, boil a big pot of salted water. Add the gnocchi and cook until they float to the surface, usually 2–3 minutes. Drain, reserving 1/2 cup of the cooking water.
Toss with pesto: Return the gnocchi to the pot off the heat.
Add 1/2 cup pesto and a splash of the reserved cooking water. Stir gently until glossy and evenly coated. Add more pesto or water as needed for a silky sauce.
Add the roasted veggies: Scrape the roasted vegetables and any pan juices into the gnocchi.
Add lemon zest and a squeeze of juice. Toss gently to combine.
Finish and season: Taste and adjust with salt, pepper, and more lemon if needed. Stir in a handful of torn basil.
If you like heat, sprinkle in red pepper flakes.
Serve: Plate with plenty of grated Parmesan or a vegetarian hard cheese. Drizzle with a little olive oil for shine.