i don't see the difference
The first one tries to put expansion flags in {} instead of (). That's nothing to do with spaces, Ray. It's always ${(flags)...} - curlies on the outside, parens on the inside.
.
As for this:
sed -r 's/(\x1b\[K[:-]\x1b\[m\x1b\[K)[[:space:]]*/\1 /g'
Even if you stick with sed you might prefer an ANSI string version of the command:
$'s/(\e\\[K[:-]\e\\[m\e\\[K)[ \t]*/\\1 /g'