I have actually found information about an animal that has pinhole eyes!!!
It is the Nautilus from the cephalopod family. Their eye structure is highly developed but lacks a solid lens. They have a simple ''pinhole'' lens through which water can pass!
I find this absolutely fascinating, and wonder if their way of seeing is closer to a pinhole camera compared to our way of seeing.