Quantum state transfer via a hybrid solid–optomechanical interface