Case 1: Suppose I have an infinite slab of thickness $D$ connected on one end to a heat bath at temperature $T_B.$ The other end of the slab is exposed to a vacuum, and is at temperature $T_E.$ The material is not necessarily a perfect Black Body.
Case 2: The situation is the same, except now the entire slab is at a uniform temperature $T_E.$
Question: would the total emitted electromagnetic radiation, $\varepsilon_{\rm eff}(T) \sigma A T^4,$ be different in these two cases? In other words, does the presence of a temperature gradient affect the radiation which is emitted, or is the surface temperature only what is important?
For a less contrived example, the sun has a much different temperature at the core than it does at the surface. Would the sun "seem" the same if its temperature throughout the entirety of it were just the surface temperature?