Heat the olive oil in a large pot over medium heat. Add the diced onion and sauté for about 5 minutes until it becomes translucent.
Stir in the minced garlic, diced carrots, and celery. Cook for an additional 5 minutes, stirring occasionally, until the vegetables are softened.
Add the dried thyme, dried oregano, and red pepper flakes (if using) to the pot. Stir well to combine and let cook for 1 minute to release the flavors.
Add the cannellini beans, vegetable broth, chopped kale or Swiss chard, and diced tomatoes to the pot. Bring the mixture to a gentle boil.
Reduce the heat to low and let the stew simmer for about 20 minutes, allowing the flavors to meld and the greens to soften.
Season with salt, pepper, and lemon juice to taste. If desired, serve hot, garnished with grated Parmesan cheese.
For added heartiness, serve this stew with crusty bread or over a bed of cooked rice or quinoa.