Preheat oven to 350 degrees F (175 degrees C). Spray a 9x13-inch baking pan with cooking spray.
Spread chopped peanuts on the bottom of the baking pan.
Mix chocolate cake mix, water, eggs, and oil in a large bowl with an electric mixer on medium speed until smooth. Fold peanut butter cups into the cake batter. Pour over peanuts in the baking pan.
Mix 2 cups confectioners' sugar, cream cheese, and peanut butter in another large bowl with an electric mixer until smooth. Drop tablespoonfuls of cream cheese mixture over cake batter in the baking pan.
Bake in the preheated oven until a toothpick inserted into the center comes out clean, about 45 minutes.
Melt butter in a small saucepan over medium heat. Add milk and cocoa powder; bring to a boil. Reduce heat and stir in remaining 1 1/2 cup confectioners' sugar. Remove from heat and let glaze cool somewhat, 5 to 10 minutes.
Pour glaze over baked cake; glaze will pool in cream cheese craters.