There are two ways of accessing eBooks in Spanish via the New York Public Library.
1. You can search their catalog from the link below. Choose Spanish and eBooks from the filter results options on the left of the results list. No login needed to search their catalog, but NYPL library card needed to check out eBooks.
2. Search the NYPL's Digitalia, a large database of eBooks and eJournals in Spanish. NYPL library card required.
There are online portals that provide free access to digitized books and other materials.