My question is, is this a possible/valid way to add a "hidden" outlet for outside IP camera?
Generally "not valid" (under NEC rules) since you are combining low voltage and high voltage in a box without a barrier separating them. That is, it's a clear code violation. 


  I nailed the outlet to a stud on the right (without a plastic gangbox)


That sounds rather like an additional code violation.

48V POE (af/at) or 24V passive POE (Power Over Ethernet) are generally much better ways to handle powering cameras, since there is no need to make horrible kludges to get a power adapter anywhere near the camera.