Macbook Pro, two external monitors, clamshell mode and heat
From MacBook Pro (Retina, 15-inch, Mid 2015) - Technical Specifications: 


  Operating temperature for the Macbook Pro Mid 2015: 50° to 95° F (10° to 35° C).


You should be able to use it in closed-display mode (a.k.a. closed-clamshell mode) just fine providing the back hinge has a way to dissipate heat appropriately. If it gets too hot, it will auto shut down after the max temperature is reached.