Huge anharmonic effects in superconducting hydrides and transition metal dichalcogenides