The problem
Quotes ("...") are not evaluated when you do:
$($COMMAND)
What the remote Bash sees is two arguments: "echo and 'hello'", not echo 'hello' as you would expect.
Proposed solution: arrays
What I would suggest in your case is to use an array:
COMMAND=( ssh localhost "echo 'hello'" )
OUTPUT=$( "${COMMAND[@]}" )
Words within (...) are the elements of the array. In this case, echo 'hello' is seen a single element: quotes are evaluated immediately during the assignment. Then, when you do "${COMMAND[@]}", every element will be passed as an argument untouched.
There are also several other ways to solve this problem, such as using eval so that the quotes will be evaluated, but in my experience using arrays is the safest and the easiest way to build and execute commands. With arrays it's easy to prevent shell-injection attacks, prevent unwanted expansion, prevent words to be broken when there's a space. The only drawback is that arrays are not available in every shell.
Explanation of the problem
The reason is that expansion (i.e. $COMMAND) does not evaluate quotes.
This is demonstrated by this simple example, where we print each argument one per line:
$ COMMAND="ssh localhost \"echo 'hello'\""
$ for x in $COMMAND; do echo "$x"; done
ssh
localhost
"echo
'hello'"
By using an array instead:
$ COMMAND=( ssh localhost "echo 'hello'" )
$ for x in "${COMMAND[@]}"; do echo "$x"; done
ssh
localhost
echo 'hello'
With the array, echo 'hello' is on a single line (i.e. it's a single argument), with a simple string instead "echo and 'hello'" are split.