Bring a large pot of water to a boil. Add spaghetti and cook until just tender, about 9 minutes or according to package directions.
Meanwhile, heat oil in a medium saucepan over medium heat. Add leek and cook, stirring frequently, until softened, about 2 minutes. Add squash and peas; cook, stirring often, until crisp-tender, about 3 minutes. Add tomatoes and broth and bring to a simmer, stirring often. Simmer until the tomatoes begin to soften, about 1 minute. Add basil and pepper; cook, stirring, until the tomatoes are juicy, 1 minute more. Remove from heat and stir in cheese.
Drain the pasta; add it to the ragout and toss well to combine.