View EXIF/metadata found in photo?
The metadata in the filesystem is exposed from mdls but I don’t recall ever seeing exit data being parsed as that is embedded in the binary portion of the file and not stored as filesystem metadata on APFS or HFS.

Go get exif tool as a stand alone download https://www.sno.phy.queensu.ca/~phil/exiftool/ or you can use https://brew.sh to get exiftool and script extracting the data you want, subsequently saving it as metadata for mdls or spotlight.

There might be a (un)documented way to parse the database files within Photos, but since those are private, I expect they change from version to version or are going to be some work to extract. Maybe an excellent tool like Power Photos could help there parsing the data from Photos libraries: https://www.fatcatsoftware.com/powerphotos/