On the Hayashi track the surface area decreases enormously. The protostar contracts at almost constant surface temperature. The contraction results in gravitational potential energy heating the protostellar interior and supplying the protostellar luminosity. In some cases, accretion from a disc also contributes some luminosity.
I am not sure what you mean by an optically thick "shell". Class I protostars are still accreting from an optically thick envelope and are not generally shown on an HR diagram. However their (infrared) luminosities can be very large - powered by accretion and contraction. Protostars on the Hayashi track are either class II or class III protostars (or pre main sequence stars). These have visible photospheres and any circumstellar matter is confined to a disc.