Heat the olive oil in a large skillet over medium-high heat until shimmering.
Add the chopped shallot and cook, stirring occasionally, until softened, about 3 minutes.
Add the spinach and cook until wilted, then stir in the minced garlic and cook for 1 minute more.
Stir in the drained cannellini beans and the vegetable broth, then season with kosher salt, black pepper, and crushed red pepper flakes.
Bring the mixture to a boil, then reduce heat to a simmer and cook, stirring occasionally, about 10 minutes so the beans soften and the sauce thickens; mash some beans with a spoon if you prefer a creamier texture.
Remove from heat and stir in the Parmesan (or nutritional yeast) and 1 to 2 tablespoons lemon juice; add extra broth if the mixture is too thick.
Serve warm with crusty bread.