Lots of cheap IP cameras have streaming or FTP snapshot features. Won't really need a script for that, just a simple server on that Raspberry Pi. Night vision and solar power only probably won't work without batteries.
Therefore, battery pack/solar panel setup are based on power draw, but a IP camera, cheap PoE switch, and wireless bridge could possibly work. I used something similar to bridge a security camera on a far side of a building to the local network that lacked Cat5. Ran about 1.5TB of video data a week, just FYI.
Cheaper yet, an old phone with webcam software may check some boxes, but night vision would probably suck.