Quantifying transfer learning synergies in infinite-layer and perovskite nitrides, oxides, and fluorides