Preheat your oven to 350°F (175°C). Grease and flour a 9x13 inch baking pan.
In a large mixing bowl, cream together the softened butter and granulated sugar until light and fluffy, about 3-4 minutes.
Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt.
Gradually add the dry ingredients to the wet mixture, alternating with the milk. Start and end with the flour mixture. Mix until just combined.
Gently fold in the chopped pistachios and raspberries, being careful not to break the raspberries.
Pour the batter into the prepared baking pan and spread it evenly.
Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean. Allow the cake to cool in the pan for 10 minutes before transferring it to a wire rack to cool completely.
Once cooled, dust the top with powdered sugar if desired. Slice and serve.