In a large pot or Dutch oven, heat the olive oil over medium heat. Add the diced onion and sauté until translucent, about 5 minutes.
Stir in the minced garlic, salt, black pepper, and red pepper flakes (if using). Cook for another minute until fragrant.
Add the vegetable or chicken broth and bring to a boil. Once boiling, reduce the heat and let it simmer for 5 minutes.
Stir in the heavy cream, chopped artichoke hearts, and chopped spinach. Cook for an additional 5-7 minutes, or until the spinach has wilted.
Using an immersion blender, carefully blend the soup until smooth. If you don’t have an immersion blender, transfer the soup in batches to a regular blender, blending until smooth.
Return the blended soup to the pot (if using a regular blender), then stir in the grated Parmesan cheese and lemon juice. Heat for another 2-3 minutes until warmed through.
Taste and adjust seasoning if necessary before serving.