It seems that no one actually knows if it comes form "nila" or "nilad". Researchers have theories but it's hard to tell now if the "d" was originally there or not.
Here's a nice excerpt that sums up the possibilities, and I've also linked some more sources where this is explained a bit more.
"The marshy delta at the mouth of the Pasig had an abundance of mangroves,
including a variety known as nilad, and was also overgrown with an indigo
plant called nila. Conflicting assumptions were made that the city's name
came from of these terms--hence Maynilad (where nilad is found), and Manilad
(where nilad abounds), or Maynila (where nila exists) and Manila (where nila
is plentiful)."
https://digitalcommons.unomaha.edu/cgi/viewcontent.cgi?article=1230&context=cparpubarchiveshttps://www.jstor.org/stable/29791237?read-now=1&refreqid=excelsior%3A507cf6ab780a27d13a4504f342e2b1c5&seq=1#page_scan_tab_contentshttps://www.jstor.org/stable/29791188?read-now=1&refreqid=excelsior%3Ad2ed71c793daa96219ecb27ab5138248&seq=1#page_scan_tab_contentshttps://en.wikipedia.org/wiki/Prehistory_of_Manila
https://www.behindthename.com/pnl/109883