Publicly traded miners are riding the AI infrastructure boom as investors bet excess capacity can fuel high-performance computing.