1. Combine the apple, chilies, ginger, vinegar, brown sugar and salt in a small saucepan over high heat. Bring to a boil, then lower the heat to a simmer. Allow to simmer, uncovered, until the apple is tender and most of the liquid has cooked off, about 20 minutes, while you begin working on the samosa cakes. Once the chutney is finished cooking, let it cool and then stir in the cilantro.
2. Place the potatoes in a large saucepan and cover them with water. Bring to a boil, then lower heat to a simmer. Cook until the potatoes are tender, about 15 minutes.
3. Drain and set aside.
4. Place 2 tablespoons of oil in a large skillet over medium-high heat.
5. Add the onion and saut until softened, about 5 minutes. Stir in the garlic and ginger and saut another minute, until fragrant, and then add the cooked potatoes, peanuts and peas. Saut until the outsides of the potatoes begin to form a crust in spots, about 3 minutes. Stir in the flour, flax seeds, garam masala, turmeric, coriander, chili powder, salt, pepper, broth, panko, cilantro and lemon juice.
6. Remove from heat.Allow the mixture to sit for at least 10 minutes, until cool enough to handle.Use a potato masher to break up any large chunks of potatoes. Shape the mixture into 8 patties, about 3 inches in diameter, pressing firmly into shape.Wipe the skillet clean, then set it over medium-high heat and coat it with 1/2 tablespoon of oil.Arrange patties in the skillet and cook until lightly browned on the bottoms, about 3 minutes. During cooking, use a spatula to gently press down on the top of each patty. If this causes the patty to spread out, use the spatula to draw the sides back in. Gently flip and cook until lightly browned on other side, about 3 minutes more.
7. Serve with Apple Chutney.