Bring a large pot of salted water to a boil.
Place basil, parsley, pistachios, garlic, and salt in the bowl of a food processor; pulse to combine. With the machine running, add 1 1/2 cups olive oil in a slow, steady stream. Process until a smooth paste forms, scraping down sides of bowl as necessary. Transfer half of the pesto mixture to a large skillet; reserve remaining pesto for another use.
Add spaghetti to boiling water and cook, according to package directions, until al dente. Drain pasta, reserving 1 cup cooking liquid. Add cooking liquid to skillet along with pasta and toss to combine. Drizzle with remaining 2 tablespoons olive oil and sprinkle with cheese; toss to combine and serve.