Cook the ravioli according to package instructions in a large pot of salted boiling water. Drain and set aside, reserving 1/4 cup of the 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 chopped spinach and cook until wilted, about 2-3 minutes.
Stir in the chopped artichoke hearts, capers, and sun-dried tomatoes. Cook for another 2 minutes, mixing well.
Pour in the heavy cream and bring to a gentle simmer. Stir in the Parmesan cheese until melted and the sauce is creamy. If the sauce is too thick, add some reserved pasta water to reach desired consistency.
Season with salt and pepper to taste. Gently fold in the cooked ravioli, ensuring they are well coated in the sauce.
Serve immediately, garnished with fresh basil if desired.