I’m one to think that if you’re determined enough, there is always a way. I also don’t think dietary restrictions should be something to ever hold you back from your dreams. I’m vegan, so I’ve definitely had to pass on a few dining options, which of course meant that I may have not gotten the most “authentic” experience, but my values were important enough to me to refuse to compromise. I would imagine being gluten-free would require the same things. So maybe you won’t be able to partake in an award-winning pasta dish in Italy, but there are enough options in the world that you wouldn’t starve. You just have to want it bad enough. So if traveling is a high priority for you, you will find something to eat. Even if that means eating 2/3 meals a day from a produce market.
As far as the medicine, I would look up countries that your prescription is illegal and do more research into if you’re allowed to bring it over the border. When I was living in Morocco, a fellow American traveler I met there had a prescription for Adderall, which was illegal in that country, but he was able to bring it because it was in a prescription bottle with his name on it. If it’s more the ability to get it, then I would talk to your Doctor and see if they can write you a longer prescription — I had to do that with anti-depressants once, and the doctor complied.
The cannabis I imagine would be a bit more tricky. If it’s something you’re really not in a position to temporarily give up, I would stick to places where you can get it. I found this cool list of places where it’s either legal or socially acceptable. I personally wouldn’t mess with sneaking anything across borders (Locked Up Abroad on Netflix scared me out of that one), but I think that there’s an absolutely a way to get weed while traveling. I’ve been offered it from strangers plenty times while overseas, so I wouldn’t let the fear of not having it stop you from exploring!