Hi. Welcome to Just Answer.
I am sorry, but no. Wood glue is desogned to glue wood and other wood products. It will not adhear to tile. The most permanent and best way to do this would be to bolt the moulding to the wall framing and then use just a touch of caulking (apply, wipe with a soggy rag and then with a damp one, and finger smooth) to trim in the corners.
Please let me know if you have any other immediate concerns.If not please select a positive rating at this time. Doing so will not close your question, and after you rate my service you may ask any followup questions you like. All at no additional charge.Thank you for the opportunity to serve you. Best, Smitty**How to rate your expert**