"It's not bad, but it's still pretty bad" is a phrase I can see myself saying. Not sure about the other way round - doesn't really work for me, but to each their own...
For me, it all depends on tone of voice, and what word is emphasized. “Pretty good!” generally means better than expected. “Pretty good” is like “Good, but…”
Neither, really. I use it to mean "more than expected". Like, if my kids insist I watch a cartoon with them, and I enjoy it, i'd say it's "pretty good". Or if a coworker said something awful about a customer, I might say the comment was "pretty mean".
Therefore it ranges from "utter fucking shite but I'll say it a different way" to "moderately utter bollocks but bearable" right up to "yeah it's alright"
Generally better, but it's contextual. Someone saying with a surprised tone "It was pretty good" implies that it's better than good and better than expected, and that the person might not have expected it to be good. Someone saying with a muted or dull "It was good..." would be worse than "pretty good" and implies that it was acceptable but disappointing or mediocre.
I can't imagine how "pretty good" could mean "better than good." Most of the examples posted here are talking about how something relates to your expectations, but that's not the question. Yes, "pretty good" is often used to describe something that is better than expected, but that doesn't make it better than "good."
For example, it doesn't make sense to say "$50 is good, but $100 is pretty good!"
I do think "pretty good" is often used as an understated way to say that something is very good, e.g. "Yeah, Messi is pretty good at soccer." However, that's a play on the actual meaning of the phrase, and should not be construed as the actual meaning.
Generally, for me, it means something less than entirely "good."
The times I'm most likely to use it are when I'm finding minor fault with something - "Well... it was pretty good, but..." or when something is better than I expected, but not quite fully good - "Hey! That was actually pretty good!"