This cake also makes a lovely addition to a breakfast or brunch table. Try it with a dollop of sour cream on top.
Preheat oven to 375 degrees. Brush a 9-by-3-inch baking dish with butter. Line bottom and 2 long sides with parchment, leaving a 2-inch overhang; butter parchment.
Whisk together flour, baking powder, salt, baking soda, allspice, and ginger. In a large bowl, whisk eggs until pale and foamy. Whisk in sugar and vanilla until combined. Add half of flour mixture, then half of butter and sour cream, whisking just until combined. Repeat with remaining flour mixture, butter, and sour cream (do not overmix). Transfer batter to prepared baking dish, smoothing top with a spatula.
Toss apples with lemon juice and scatter evenly over batter. Bake until apples are tender and golden brown in places and a toothpick inserted into center of cake comes out with moist crumbs, 40 to 45 minutes. Warm jam in a small saucepan over medium until it becomes thin and brushable. Immediately brush apples with jam. Let cool completely on a wire rack. Lift cake from pan using parchment and transfer to a board to slice; serve.