Preheat oven to 200ºC (400ºF).
Place the beans, pecans, sesame seeds and chia seeds in a food processor and blitz until they've formed a bit of a paste. Transfer to a bowl.
Next, place the sweet potato, onions, herbs (stalks and all), spinach and garlic into the food processor and blitz until finely chopped. Add to the bowl with the beans, nuts and seeds.
Add the spices, salt and flour and stir to combine. You may need a little more flour if your mixture is still wet.
Divide the mixture into 4 pieces and shape into patties. Coat the patties in polenta. Heat the oil in a frying pan and fry the patties for 2-3 minutes a side, until crisp and golden. Transfer to a baking tray and bake in the oven for about 30 minutes (you may need longer depending on their size) until firm. Add a couple of slices of cheese to each burger a minute or two before the end if liked.