The tex executable runs the “original Knuth TeX”, whereas \pdfpagewidth is a pdftex primitive.
The usual
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfpagewidth\endcsname\relax
\else
\pdfpagewidth 8.5 truein
\pdfpageheight 11 truein
\fi
will do. After it, \pdfpagewidth and \pdfpageheight will not be defined if they weren't to begin with.
Note that there are some LaTeX packages that can be used also with Plain TeX. Of these you could consider ifetex, because a distinctive feature of Knuth TeX is not having e-TeX extensions. So you could do
\input ifetex.sty
and do
\ifetex
<code for non Knuth TeX>
\else
<code for Knuth TeX>
\fi
The <code for non Knuth TeX> may distinguish from PDF and DVI output by using
\input ifpdf.sty
and the provided \ifpdf conditional. There are also ifxetex.sty and ifluatex.sty; all of them can be loaded in Plain with \input if<...>.sty.
There's also the “all-in-one” package iftex.sty, but its implementation is really basic with respect to ifpdf, ifxetex and ifluatex. It doesn't provide any way for checking e-TeX extensions.
\ifdefined\pdfpagewidth\else\newdim\pdfpagewidth...\fiIIRC,\ifdefinedis from eTeX, so wouldn't work on actual TeX. – morbusg Oct 04 '14 at 07:13