Place the beans in a stockpot with the water, garlic cloves, 2 tablespoons of the oil, and 1 teaspoon of the salt. Bring to a boil and simmer, uncovered, for 1 hour, or until the water has been absorbed. Transfer the beans and garlic to the bowl of a food processor fitted with the metal blade and puree them.
While the beans are simmering, heat 6 tablespoons of the olive oil in a medium skillet. Add the onions and potatoes and cook over medium-low heat for 12 to 15 minutes, until the onions are golden and the potato tender. Stir in the tomato paste and pepper flakes. Season with black pepper and 1 teaspoon of the salt.
Lightly grease a 10-inch pie plate. Sprinkle it with bread crumbs. Preheat the oven to 350 degrees F.
Transfer the pureed beans to a bowl. Stir in the Parmesan cheese, the remaining 1/2 teaspoon salt, and the remaining 1 tablespoon of olive oil. Beat in the eggs. Scrape the mixture into the pie plate, smoothing the surface with a spatula.
Cover the beans with the onion and potato mixture, spreading it evenly over the top. Bake the pie for 35 to 40 minutes, until puffed and golden. Remove from the oven and sprinkle with the minced parsley. Serve warm.
Recipe courtesy of Darra Goldstein, The Vegetarian Hearth