Bring a large pot of salted water to a boil. Add the pasta and cook according to package instructions until al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the minced garlic and sauté for about 1 minute, or until fragrant.
Stir in the thawed spinach and chopped artichoke hearts. Cook for 2-3 minutes, allowing the flavors to meld.
Reduce the heat to low. Add the softened cream cheese to the skillet, stirring until it melts and combines with the spinach and artichokes.
Gradually pour in the milk, stirring continuously until the sauce is smooth.
Mix in the grated Parmesan cheese, salt, black pepper, and red pepper flakes (if using). Continue to stir until the cheese is melted and the sauce is creamy.
Add the cooked pasta to the skillet, tossing to coat the pasta evenly with the sauce.
Serve hot, garnished with fresh parsley if desired.