Cook the spaghetti or linguine according to package instructions until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute until fragrant.
Add the shrimp to the skillet and season with salt, black pepper, and red pepper flakes if using. Cook for 2-3 minutes on each side until the shrimp are pink and opaque.
Stir in the cherry tomatoes and cook for another 2 minutes until they start to soften.
Add the fresh spinach to the skillet and cook until wilted, about 1-2 minutes.
Toss the cooked pasta into the skillet with the shrimp and vegetables. If the mixture seems dry, add some reserved pasta water until you reach your desired consistency.
Remove from heat and stir in the Parmesan cheese, lemon juice, and chopped parsley. Mix well to combine.
Serve immediately, garnished with additional Parmesan and parsley if desired.