Heat olive oil in large cast iron skillet over medium high heat. Add onions and 1/4 tsp salt and cook, stirring frequently until the onions are lightly browned, about 5 minutes.
Add walnuts and cook, stirring occasionally, about 3 minutes.
Add mushrooms, garlic, black pepper, and spices. Cook, stirring frequently until the mushrooms are cooked through.
Stir in white beans and cook for about 2 minutes. Remove from heat and stir in bread crumbs and lemon juice. Taste and adjust seasoning, adding a bit more salt and pepper.
Transfer mixture to food processor, add flax egg and pulse until the mixture comes together. Form mixture into patties (I made 6 thin burgers, since I wanted double patties, big mac-style.) Make thicker patties if you prefer. Heat oil in the cast-iron skillet over medium-high heat and pan-fry patties in batches, adding more oil as needed. Flip, and let cook until they are nicely browned on both sides.