Images in these databases have their uses restricted to educational or research purpose by the terms of the library's subscription, and are not suitable for publication. Downloads are typically restricted to sizes appropriate for projecting.
These large databases contain millions of images on many subjects, almost all images are either in the public domain (pre 1923) and thus can be used without restriction, or made available under a creative commons license
Many museums have started making high quality images downloadable without permissions. The following museums have made at least some of their images available for free re-use. You can explore a database of museums with Open Access image policies at the OpenGLAM website
Some museums restrict access to high quality images, and only allow smaller images to be downloaded. To get the high quality images you may need to request permissions and sometimes pay a fee.