Bridging the Gap Between Foundation Models and Heterogeneous Federated Learning