Preheat oven to 325° F. Mist an 8-inch square baking dish with cooking spray; line with parchment. Pulse 2 Tbsp. flaxseeds in a spice grinder until finely ground.
In a food processor, combine nut butter, agave, 1/2 cup raisins, vanilla, ground flaxseeds, 1/4 cup water and salt; process mixture until pureed.
Place oats, nuts, remaining 1/2 cup raisins and unground flaxseeds in a bowl; stir in nut butter mixture. Spread in baking dish, tucking in exposed raisins. Sprinkle with flaky salt, if desired. Press mixture down firmly.
Bake until dark golden and dry to the touch (mixture will not rise), 30 to 35 minutes. Press down again. Let cool completely in baking dish on a wire rack, then remove from baking dish and cut into 12 bars. To store, stack bars in an airtight container with waxed paper or parchment between layers; keep at room temperature for up to 3 days.