We had exclusive use of a free mooring for four days right under the "city" of Thira on the west side of Santorini. Priceless! We only left because a bunch of fat, naked Germans showed up on a rusty steel yacht and wanted to raft-up with us.
We found a free marina on the southern side of Santorini where we stayed another two weeks.
When checking into Malta - the harbourmaster asked where we wanted to keep the boat, to which I replied "I'd prefer to stay wherever it won't cost anything". He smiled and suggested we go around and take an empty mooring in the creek near the ancient boatyard . He said there were plenty of vacant moorings around there and that it was generallay okay to stay unless the owner asked you to leave. The owner did come by and he offered me a job! We stayed four weeks and made some money doing harbour cruises on a funky Maltese fishing boat! Priceless!
Many marinas in the Med can certainly be expensive but local fishing harbors are often free of charge.
We stopped in Cyprus, Turkey, Greece, Crete, Malta, Sicily, Stromboli, Sardenia, the Balerics, Spain, Morocco & Gibraltar and were rarely required to pay for mooring or marina berthing. And you can always find a safe place to drop the hook for free.
Just make sure you have a strong anchor windlass, a lot of fenders and a reliable dinghy... and don't wear out your welcome.