WPML – 404 Error when I try to pass GET parameters in my “different languages in directories” installation

The problem your GET param is using the same name as the query var for your custom post type.

$link = $link_aqui_se_sirve.'?'.$establecimientos_cpt_name.'='.$tax->slug;

With that URL, WordPress is expecting the value of the $establecimientos_cpt_name parameter to be a post slug. Instead you are giving it a taxonomy slug. This will give you a 404 unless you have a post that happens to have the same slug as your taxonomy.

If you are setting this parameter for your own purposes, you should choose a name that does not collide with WordPress’ internal request processing.