I feel for you as I have the same problem. I would suggest that it is your hearing. My daughter is an audiologist and she explained it to me. It is a condition called Hyperacusis. If you suffer from this you will find that you are sensitive to certain frequencies which feel like they hurt your ears. It is most common that higher frequencies are the worst offenders. Like you the upper register of the piano (mainly above middle C for me) is a strong offender. My daughter is a pianist and I cannot sit in the same room as she when she plays. Other things that you might find uncomfortable in this register of your hearing are: clanking plates when a dishwasher is unloaded, screaming babies, violins, a nail being hammered in, being in full loud restaurants which have a lot of reflective surfaces etc.
Hyperacusis usually comes on gradually during late middle age, but can come on earlier if you have damaged hearing
Unfortunately there is no cure and it is a sign that your hearing is permanently damaged and needs protecting if you go into anywhere loud. So wear ear protection if you go to gigs. You may also get tinnitus with Hyperacusis, but not always. The good news is that if you protect your ears in loud environments it should not get worse.
Regarding Hi-Fi: I had to sell my Naim gear as it sounded harsh and affected my Hyperacusis. I demoed many solid state amps, front ends and speakers. I ended up with a Vitus amp and DAC - they have a wonderful sound with no hard edges that affect my hearing. Speakers I chose were Boenicke (a Swiss company making very natural sounding speakers). I also recommend Luxman amps, they were very smooth and didn’t affect my ears.
Good luck!