Is compiled code more of a security risk than interpreted code? I'm under the impression that it is due to the fact that compiled code can hide malicious code from malware scans.
There is no difference between compiled code and interpreted code as far as the detection goes. The reason most malware authors use compiled code for their malware is due to the fact that native compiled code is not dependent on any external library or interpreted environment. A native exe is going to run on a Windows or Linux machine without requiring any other software on the victim's machine. By contrast, a malware that is written in perl or python needs perl or python interpreter on the target environment for its execution. Therefore, the stacks gets lower if a given malware will run on a machine or not if it is dependent on any special environment or configuration.
Compiled code is just translated into machine code, an attacker can alter instructions for both, compiled and interpreted. Whatever you could do with one, you can also do with the other.
Your decision for either compiled or interpreted should be dependent on what you actually want to do with your code. Compiled languages usually have a higher performance, while you can easily modify interpreted code. It is easy to implement and you can run/test it on the fly.
There should be no difference between interpreted and compiled code regarding security issues, and languages should not be categorized that way in my opinion.