There is zero extra risk in being a melee compared to ranged in this game. Standing in front of a boss and getting cleaved in half is exactly the same as running into a fire and wondering why you're getting roasted. Movement punishes casters more than melee, unless you have to disengage for a longer duration.