The foam is destroyed by sunlight. You would need to black out the windows first. Further, there is a not insignificant amount of pressure from the expanding foam that would bow out the plywood, I would imagine. Also, you are going to want to use two part foam, if you hadn't realized already, as the spray can stuff isn't very good for large areas. As for waterproof? I couldn't say. I would expect nooks and crannies to not get properly filled, though, probably leading to rust issues.