Start preparing the cranberry layer: Combine the cranberries, sugar and 3 tablespoons water in a medium saucepan. Zest 2 of the lemons directly into the saucepan; reserve the lemons. Bring to a boil over medium-high heat, stirring occasionally. Continue boiling, stirring occasionally, until the berries burst and the mixture is jammy, 7 to 9 minutes. Remove from the heat and reserve.
Make the crust: Heat oven to 350 degrees. Line the bottom and sides of a 9-by-13-inch baking pan with one large sheet of heavy aluminum foil, making sure there are no gaps or holes, then generously coat with cooking spray.
Whisk the flour, sugar and salt in a medium bowl. Whisk the vanilla into the butter, then pour over the flour mixture. Stir until the dough comes together in a mass. Press into an even layer in the prepared pan. Bake until golden brown around the edges and dry and golden on top, 17 to 20 minutes.
While the crust bakes, begin preparing the lemon layer: Squeeze the juice from the 2 reserved zested lemons. You should have 1/2 cup. Squeeze the juice from another lemon, if needed.
Whisk the sugar, flour and salt in a medium bowl. Add the eggs and whisk gently just until incorporated. Add the lemon juice and stir gently with the whisk just until smooth.
Let the crust cool for 5 minutes, then spread the cranberry mixture evenly over the crust. Carefully and slowly pour the lemon mixture on top to create two distinct layers.
Return the pan to the oven and bake until the filling is set, 18 to 22 minutes. Cool completely in the pan on a wire rack, then refrigerate until cold and firm, at least 2 hours. Using the foil, slide the bars out of the pan and onto a cutting board. Cut into 24 squares, wiping your knife between cuts for clean slices. If desired, sift confectioners’ sugar over the tops just before serving.