Take a look in /System/Library/StartupItems, and you'll see all the various things osx starts at boot. You can copy one of those, and just make the obvious changes to run squid.
To do it entirely correctly, you'll actually want to create /Library/StartupItems, and put your new item in there...