It's actually a machloket haposkim (argument among the decisors), with the point of contention exactly that raised in the question.
From the CRC:
Some (Chayei Adam 51:17 & Nishmas Adam 152:1, Yechaveh Da’as 6:12, and Machzeh Eliyahu 25-29) hold that the bracha is shehakol because the wording of the bracha “Boruch…who creates the fruit of the earth” (borei pri ha’adamah) is inappropriate for items that grow unattached to the firmament or that grow in a non-earthlike media (e.g. water, coconut coir). Rav Schwartz ruled that one should follow this opinion.
Others argue that the bracha of borei pri ha’adamah was instituted for all vegetables regardless of exactly how they grew. This is the opinion of Chazon Ish, Rav Shlomo Zalman Auerbach (Vezos HaBracha, Birur Halacha #24), Shevet HaLevi (1:205), Teshuvos V’Hanhagos 2:149, and Rav Shmuel Kaminetzky (Kovetz Halachos, Pesach 24:6).
The Star-K paskens according to the first opinion, that it is shehakol, but adds a caveat:
Still, unless one knows definitively that the produce was grown hydroponically, one should assume it was earth-grown and recite Hoadama (Yechaveh Da'as 6:12).
I could not find anything that specifically addresses aeroponics, but it seems to me to that it should have the same halacha as hydroponics.