"equivalent" shell scripts - one works, one doesn't

Just checking, but you did use two backslashes in your KM text field, didn't you? Eg /Users/Me/desktop\\ Downloads

Another way to deal with spaces in paths is to double-quote -- note that you either have to use the full path or put the ~ before your KM variable:

There's an example of using eval with a KM variable here. Note that you don't wrap the variable in quotes but you do (in your case) include the curl part -- you're telling the shell to "evaluate the string curl --create-dirs....