In pāin and rāin:
The vowel team ai appears in the middle of a syllable. The first vowel speaks its name, the second is silent!
In pāne and lāne:
The magic silent final e reaches over the single consonant n to make the vowel a say its long name (/eɪ/).
Pronounced /eɪk/ (rhymes with bake).
The letters ch make the hard /k/ sound (from Old English acan). A true synonym for pain with a unique history!