By spectrally hole burning an inhomogeneously broadened ensemble of ions while applying a controlled perturbation, one can obtain spectral holes that are functionalized for maximum sensitivity to different perturbations. We propose to use such hole burnt structures for the dispersive optical interaction with rare-earth ion dopants whose frequencies are sensitive to crystal strain due to the bending motion of a crystal cantilever. A quantitative analysis shows that good optical sensitivity to the bending motion is obtained if a magnetic field gradient is applied across the crystal during hole burning, and that the resulting opto-mechanical coupling strength is sufficient for observing quantum features such as zero point vibrations.