Preheat oven to 350°F (175°C). Line two 9-inch round cake pans with parchment paper and spray with cooking spray.
Cream butter and sugars in a large bowl with electric mixer until light and fluffy, about 5 minutes. Add lemon zest, extracts, and eggs one at a time.
Mix dry ingredients in separate bowl: cake flour, baking powder, baking soda, and salt.
Alternate adding dry ingredients and wet ingredients (milk, sour cream, lemon juice) to butter mixture. Mix until just combined.
Toss raspberries with 2 tablespoons flour, then fold into batter gently by hand.
Divide batter evenly between prepared pans. Bake 35-40 minutes until golden and toothpick comes out clean.
Cool completely in pans for 10 minutes, then turn out onto wire racks.
Make frosting: Beat cream cheese and butter until fluffy. Gradually add confectioners' sugar, then lemon zest, juice, extract, salt, and sour cream.
Assemble cake: Place one layer on serving plate, frost, add raspberry preserves, top with second layer, and frost entire cake.
Chill 20 minutes before final decorating with fresh raspberries and lemon slices.