Preheat oven to 350°F.
Saute onions and garlic in olive oil until soft.
If using fresh escarole, remove core, chop leaves roughly and boil in salted water until tender, then add to onions.
If using spinach, no need to boil, simply add spinach to onions and stir until wilted.
Add beans and ½ cup of vegetable broth to make a slightly soupy mixture.
Add salt and pepper to taste.
In a lightly oiled 9 x 13 baking dish, spread ½ of the cubed bread to cover the bottom.
Spoon onions, greens and bean mixture over bread.
Sprinkle with ¼ cup parmesan cheese.
Cover with top layer of cubed bread and sprinkle generously with parmesan cheese.
Bake for 20-30 minutes until cheese is slightly browned.