1. Preheat oven to 375ºF. Line a 9-by-13-inch baking pan on bottom and 2 long sides with a sheet of heavy-duty aluminum foil, making sure that foil is smooth and overhangs top of pan by at least 4 inches on both sides. Mist foil with cooking spray.
2. Place almonds and sugar in a food processor and process until nuts are finely ground, about 20 seconds. Add flour, butter and almond extract and process until mixture is crumbly and begins to form small clumps, 15 to 20 seconds longer.
3. Transfer 3 1/2 cups of almond mixture to baking pan and press into a compact, even layer. Spread jam lightly but evenly on top, taking care not to disturb almond layer. Press remaining almond mixture into loose, large crumbs and scatter evenly over jam. Sprinkle with sliced almonds.
4. Bake until jam is bubbling and topping is golden, 25 to 30 minutes. Let cool completely on a wire rack. Grasping overhanging foil on either side of pan, lift pastry out of pan and place on a cutting board. Cut into 36 squares. Dust with confectioners' sugar before serving, if desired.