by Howard Miller.
Short answer yes.
Slightly longer answer - unless you have some compelling restriction that means you cannot create directories outside of public_html, then create moodledata someplace other than public_html. This is safest.
If you have to have moodledata where you have put it then it is protected by an .htaccess file (which I think is added automatically). If the .htaccess file doesn't work then Moodle will refuse to run. So, if Moodle runs you are ok but your setup is not ideal.