Toast the nuts in a small, heavy skillet over medium heat, stirring frequently, until just golden and fragrant, 4-5 minutes.
Meanwhile, bring 4 quarts of water to a boil in a big pot; lower the skewered garlic into the water; boil for 45 seconds.
Immediately run the garlic under cold water; remove from skewer, peel, and mince.
Place the nuts, garlic, spinach, oil, and 1/2 teaspoon salt in the work bowl of a food processor; process until smooth, stopping as necessary to scrape down the sides of the bowl.
Transfer the mixture to a small bowl, stir in the cheeses, and adjust the salt.
Add 1 tablespoon salt and the pasta to the boiling water; cook until al dente.
Reserve 1/2 cup of the cooking water; drain the pasta and transfer it back to the cooking pot.
Mix in 1/4 cup of the reserved cooking water and the pesto; use the additional 1/4 cup cooking water as needed to moisten the sauce.
Divide among 4 warmed bowls and serve immediately.