I want to put the following line:
emacs --eval '(ediff "$1" "$2")'
ediff-find-file: File `$1' does not exist or is not readable
This is normal, your string is surrounded with single quotes, and variables are not expanded within single quotes.
You should use double quotes so that they get expanded, and escape existing double quotes in the string:
emacs --eval "(ediff \"$1\" \"$2\")"
It is worth noting that when expanding variables, only the outer quotes matter. That is:
$ A=foo $ echo "'$A'"
'foo'. The fact that single quotes surround
$A here does not matter: the outer quotes are double quotes.