Sand would give you the best draining in soil. Another alternative could be to have an open hole on each side of the bed or the back so it can't be seen. Then inside your raised bed, run some perforated pipe also called drain tile, through the bed from one end to the next and out of the bed. Maybe throw some heavy duty screen over the holes so critters can't get in. But that is what they do around buildings to keep water away from lower levels