Bring a large pot of salted water to a boil. Add the pasta and cook it according to the package directions, but set the timer for one minute short of the recommended cook time for al dente pasta. Stir in the spinach when the timer goes off, then let the pasta and spinach cook together until the pasta is al dente and the spinach has wilted, about 1 minute. Reserve about a cup of the pasta cooking water, then drain the pasta and spinach into a colander.
Make the ricotta while the pasta cooks. First, place the cashews, milk, lemon juice, and salt into the bowl of a food processor fitted with an S-blade. Blend until smooth and milky. Break the tofu into chunks and add them to the food processor bowl. Pulse the machine until the tofu is blended in but the mixture still has a chunky texture, like ricotta cheese.
When the pasta has finished cooking, heat the olive oil in a large pot over medium heat. Once the oil is hot, add the garlic. Sauté the garlic for about 1 minute, stirring constantly, until it becomes very fragrant.
Add the pasta, spinach, and ricotta mixture to the pot. Stir everything well and thin the sauce with some of the reserved pasta water, using just enough to loosen up the sauce so it easily coats the pasta. Cook everything for a minute or two, just to heat the sauce through.
Remove the pot from heat, then stir in the lemon zest and season the mixture with salt and pepper to taste.
Divide onto plates and serve with vegan Parmesan and crushed red pepper flakes, if desired.