Millisecond optical coherence and strong collective coupling in an integrated telecom rare-earth photonic platform