The ultimate trick to getting brownies and bar cookies neatly out of the pan, say Chowhounds, is to build an aluminum foil “sling” before you pour in the batter or dough. Take a piece of foil the width of your pan and line the pan, allowing the foil to overhang both ends by a few inches. Grease the foil and pan sides, or spray them with a nonstick spray, and bake your brownies or bars as usual. After cooling, cut around the edges of the pan, then grasp the overhanging foil like handles and lift the entire panful of brownies or bars out in one piece. Place your baked good on a work surface, lay the foil flat, and cut it bakery-neat. The new nonstick foil makes this process even easier.
Board Link: removing brownies from the pan