In a large pot of boiling, salted water, cook the pasta until al dente, about 12 minutes. Drain, reserving 1 cup of the pasta cooking water, and return the pasta to the pot.
Meanwhile, in a large skillet, heat 2 tablespoons olive oil over high heat. Add the ham and cook, stirring, until golden, about 3 minutes. Push the ham to the side, add the mushrooms and cook, stirring, until lightly colored, about 5 minutes. Stir in the spinach and cook until wilted, about 1 minute.
Using a small food processor, mince the garlic. Add the walnuts, parsley and lemon peel and process until finely chopped. With the machine on, add the lemon juice and remaining 1/4 cup olive oil; season with salt and pepper. Process to form a paste.
Add the walnut pesto and 1/2 cup of the reserved pasta water to the pasta; toss to coat thoroughly. Stir in the ham mixture, adding more pasta water if needed; season with salt and pepper.