Compactifications of Hitchin and maximal character varieties