Preheat oven to 325°F. Lightly grease a 9x13-inch baking pan with cooking spray. Set aside.
In a large bowl, beat butter, brown sugar, and vanilla with a hand mixer or stand mixer with fitted paddle attachment at medium speed until fluffy, about 3-4 minutes, stopping to scrape sides of bowl. Add eggs, one at a time, beating well after each addition.
In a medium bowl, whisk flour, baking powder, apple pie spice, baking soda, and salt. With the mixer of low speed, gradually add flour mixture to butter mixture, alternately with buttermilk, beginning and ending with flour mixture, beating until just combined after each addition.
Gently stir in shredded apple. Pour batter into prepared pan and arrange apple slices over top of batter.
Bake for about 40-45 minutes, or until a toothpick inserted into center of cake comes out mostly clean. Let cool completely in pan.
To make the glaze: In a small bowl, whisk together powdered sugar, milk, and vanilla until smooth. Drizzle over cooled cake. Garnish with apple pie spice, if desired.