I hate to be the one to say it but that really is a case of "learn to play". The fact of the matter is you do have the freedom to gear and stat however you like, but that doesn't mean you can just be good at everything. If you gear completely offensive with no gear or stats focusing on vitality or toughness, of course you're gonna get your shit slapped if you get hit. If you want to spec that way you have to be prepared to learn how to mitigate damage as your class, be it simple kiting and evading or making good use of crowd control skills and damage mitigation (blind/blocks/etc). The game doesn't punish you for gearing glass cannon until you're pretty far in to the levels, by that point you should start to be comfortable with your class and learning the ins and outs of it. The game has a very linear climb in difficulty (outside of dungeons which will probably make you shit yourself at 30, and maybe Orr zones where mobs get much more aggressive), so there isn't ever a time you just hit a wall and suddenly can't handle stuff. If you notice you start struggling with something it teaches you to adjust or regear accordingly.
XI Wiki



