you can "protect" the string you intend to use in sub- or superscripts by doubling the outer braces; only the outermost pair of braces gets stripped off when a definition is "internalized". thus
\newcommand{\foo}{{\ensuremath \times\ast 2}}
will have the desired effect.
however:
you really don't need \ensuremath if you're always going to use this in a sub/superscript.
it's not as "informative" when viewed in the input, since it's not obvious that \foo is a compoind object. omitting the braces at the point of use gets one out of the habit of using braces, which can get one into trouble with previously existing definitions that are "unprotected" compounds, such as \neq, defined as \def\neq{\not=} in fontmath.lts (inherited from plain.tex).
edit: a comment from the op states that this doesn't work "when setting <0 or alike as a superscript". that's true, and there's no way around it, except to make a definition, e.g. \newcommand{\lszero}{{<0}}, and use that. (that is what the original question asked for.)
\newcommand{\foo}{\ensuremath {\times\ast 2}}– Sigur Jul 30 '13 at 15:17\newcommand*{\foo}{{\times\ast 2}}works like a charm (\ensuremathis not needed and even frowned upon). – Qrrbrbirlbel Jul 30 '13 at 15:19\newcommand{\foo}{\ensuremath \times\ast 2}– arolle Jul 30 '13 at 15:20\fooas a superscript you really don't want\ensuremath. but that wasn't your question. if you just add another outer pair of braces --\newcommand{\foo}{{\ensuremath \times\ast 2}}it should withstand the indignity of being used without braces as a superscript. – barbara beeton Jul 30 '13 at 15:22\foodoesn’t take any arguments). The macro is defined via\defand not\long\def, see What's the difference between \newcommand and \newcommand*? – Qrrbrbirlbel Jul 30 '13 at 15:24<0or alike as a superscript. – arolle Jul 30 '13 at 15:39\newcommand{\foo}{{<0}}and use the definition in the subscript. the important thing is that the compound itself must be defined in this way, with the extra braces. there's no way to redefine^or_to automatically do this. but that's not what your question asked. – barbara beeton Jul 30 '13 at 15:47