It's his goodwill and perfectionist nature that has allowed him to compete with the other two Khans and surpass them, arguably.
In terms of good films, Aamir still is ahead of Salman/SRK. Whether he's pretentious or the way he markets himself is just another promotional strategy. Years after Khans are gone, if we'd look at their works regardless of BO success, I think Aamir will be more remembered, but the gulf isn't as wide though.
Aamir ~ Raakh, JJWS, Rangeela, AAA, Sarfarosh, Ghulam, DCH, Lagaan, RDB, TZP, 3I, Talaash
SRK ~ Baazigar, Darr, KHKN, DDLJ, Devdas, VZ, CDI
Salman ~ MPK, HAHK, AAA, Khamoshi, HDDCS, TN, Dabbang, Bajrangi
21