Learning in the Presence of Low-dimensional Structure: A Spiked Random Matrix Perspective