Both, and the acoustic half is smaller than people expect.
The physical part: a major third sits close to the ratio 5:4, which appears early in the harmonic series of the root. A minor third is nearer 6:5, further up the series, so the triad aligns less neatly with the overtones already present. That gives a measurable difference in roughness, but it is subtle.
The learned part does most of the work. The major and minor association with happy and sad is strong in Western listeners and much weaker or absent in listeners from other traditions. Studies with people unfamiliar with Western tonal music find the association does not reliably appear.
So the ratio gives you a small physical difference, and a few centuries of convention amplify it into the meaning you hear.