Relational Learning in Pre-Trained Models: A Theory from Hypergraph Recovery Perspective