"a dump to say least"
Honestly! Why do people hate Casablanca? I wonder if what they really mean is that it's a bit big, a bit shabby in parts and that the very real attractions are spread out and take time to get to - or that they haven't bothered researching them.
For people arriving to the culture shock of Morocco, I always think it's a wonderful introduction. Relatively little hassle, an "easy" old town, a beach, fantastic restaurants, some genuinely interesting attractions and the possibility of day trips to other nearby cities using fast and modern public transport.
This article I stumbled on the other day gives another view and actually informed me of a couple of places I'd never been to in Casa and which I shall visit in the New Year.
guardian.co.uk/travel/2010/may/08/casablanca…
As the OP has 17 days in Morocco a couple of days in Casa would be worthwhile. And, after all, one can only coo at the stars in the desert, shivering with cold, for so many nights until the novelty wears off. Or look at ruins.
One final thing. If you end your holiday in Essaouira, do not make the mistake of taking a taxi or coach back to Casa for your flight home on that day. The road is long and in my view dangerous and narrow in parts and takes a considerable time. The motorway from Safi to El Jadida will not be finished for 3 more years and the only fast part is between El Jadida and Casa. You'd be really tired out.