Authoritative scholars have mentioned that the Hadith narrations regarding aubergine are fabricated. Although this is important to note and should lead to great caution when one comes across Hadith encouraging the consumption of aubergine, and one must recognise the probability of it being fabricated, it does not mean we should not look at specific narrations on their own merit.
تقدم أن أحاديث الباذنجان موضوعة. (كشف الخفاء ومزيل الإلباس)
It has already been mentioned that the Hadith about aubergine are fabricated. (Imam al-Ajlooni, Kashf al-Khafa).
وأحاديث “الباذنجان” باطلة. (مجمع بحار الأنوار في غرائب التنزيل)
The Hadith about aubergine are fabricated. (Imam Muhammad bin Tahir al-Fattani).
As mentioned above, these statements are of great importance, nonetheless specific Hadith narrations should still be judged on their own merits, meaning the source and chain of narration. So if someone were to present a narration from a sound source with an authentic chain then it should be considered.
This is the way of the Hadith scholars, they respect blanket statements made by great scholars but still test them to see if they correspond with the reality. In my research (so far) I have found these statements to be upheld, all narrations regarding the virtue of consuming aubergine that I have come across have been baseless or fabricated (see links below for details).
And Allah (Most High) Knows Best.
– Answered by Shaykh Noorud-deen (23.06.2021)
Aubergine is a cure for every illness
Aubergine is for whatever it is eaten for
See also (video):