Hi Michal
It sounds like I'm as new to Squid and ESI as you are but I will try to help as we've encountered the same behavior. When we saw the behavior you describe it was because we were trying to cache dynamic pages with question marks and changing parameter values using the default squid.conf. To remedy that we removed the question mark from the no_cache directive in squid.conf and added a refresh_pattern directive with non-zero minimum and a regexp to match the URL. Caching now works like a champ, the problem we've since run into is that we are unable to invalidate fragments included using esi:include (i.e., 404 response on PURGE) although invalidation of the same fragment when accessed as a separate page works fine.
Thanks Brad