I got the same, it seems indeed that the symbol x is not injected into the global namespace, but the following works:
./factor "sage.calculus.var.SR.symbol('x')^2+3*sage.calculus.var.SR.symbol('x')"