Experiments show that the shape of the human ear canal is to blame for the reaction we have to fingernails on a chalkboard. With that said, the more interesting part of the research is this:
A powerful psychological component was identified. If the listeners knew that the sound was fingernails on the chalkboard, they rated it as more unpleasant than if they were told it was from a musical composition. Even when they thought it was from music, however, their skin conductivity still changed consistently, suggesting that the physical part of the response remained.
Sounds sort of like the research around the effect of knowing the price of wine on its taste.