Using \raisebox is the right way. You can use \height to refer to the height of the content i.e. the height above the baseline. The \depth should be zero for normal numbers. You then need to subtract the \height from the normal height and divide it by 2. The normal height from an uppercase letter is about 1.6ex or 80% of the \strut height given by \ht\strutbox. You can use e-TeX's \dimexpr to do the calculation.
\documentclass{article}
\newcommand{\vcentered}{\raisebox{.5\dimexpr.8\ht\strutbox-\height\relax}}
\begin{document}
0000\vcentered{\Large 6}00000\vcentered{\small 9}00000
0000\vcentered{\Huge 6}00000\vcentered{\tiny 9}00000
\end{document}
Result:

You could do it even more accurate if you would provide a reference for the normal height. In addition you could also take the depths in account.
\documentclass{article}
\newsavebox{\vrefbox}
\newcommand{\setvref}{\sbox{\vrefbox}}
\newcommand{\vcentered}{\raisebox{.5\dimexpr\ht\vrefbox-\height\relax}}
\begin{document}
\setvref{0}0000\vcentered{\Large 6}00000\vcentered{\small 9}00000
\huge
\setvref{0}0000\vcentered{\Huge 6}00000\vcentered{\tiny 9}00000
\end{document}