A source of worry or trouble; literally 'a cause of headaches' used figuratively for something that causes concern.
この借金は彼にとってずっと頭痛の種だ。
This debt has always been a source of headaches for him.
部長の不在がプロジェクトの頭痛の種になっている。
The manager's absence has become a headache for the project.
子どもの進路問題は親にとっての頭痛の種だ。
Children's career/education choices are a source of worry for parents.