To make the pastry, stir together flour, sugar, and baking powder. Cut in butter until fine crumbs form. Mix in egg until dough sticks together. Squeeze dough between fingers until it holds together. If making ahead, wrap airtight and chill up to one day.
To make topping, mix together flour and sugar. Cut butter and vanilla into the flour mixture until it resembles coarse crumbs. Squeeze dough between fingers until it holds together. If making ahead, wrap airtight and chill up to one day.
To make almond filling, beat together at high speed, sugar and softened butter until blended. Beat in eggs, one at a time, until fluffy and well blended. Stir in flour and 1 cup ground almonds until just evenly mixed.
Preheat oven to 350°F.
To assemble pie, press pastry onto bottom and up sides of a 9-inch pie pan. Bring edges of crust even with pan rim and flute edges. Spread almond filling in pastry. Bake until crust is lightly browned and filling is puffy, about 20 minutes.
Mix together berries and sprinkle over filling. Press gently down into filling if necessary to anchor berries. Break topping into small chunks and spread over berries. Return pie to oven and bake until crumble topping is lightly browned, about 35 minutes.
Serve warm or at room temperature with ice cream, if desired.