You might need to provide more of your script. The section you have shown here is not the cause of the problem. The send command merely sends the characters to the spawned process, so the redirection characters are not treated any differently.
For example, the following script successfully appends a string to a remote file (I am using '$' to match prompts, and the ssh is done through identity files to simplify the script):
Code:
#!/usr/bin/expect
set textvalue abc
spawn ssh server
expect "$"
send "echo $textvalue >>file.txt\r"
expect "$"
send "exit\r"
expect eof
What does your script display when it executes? Does it even execute the echo command? You can capture the output using the following:
Code:
expect yourscript &>expect.out