How do we do this in LaTeX? The main problem is having two rows of values as upper indices.

Sometimes the low-level commands are just nicer in my opinion:
\documentclass{article}
\begin{document}
\[ \mathrm{shaft = 20^{+0.080\atop +0.005} mm} \]
\end{document}

If you use amsmath, it will nag but does compile. However, it has been said it's better to use the higher-level macros with LaTeX, and so borrowing from Gonzalo's answer from a previous question, one might use something like the following with amsmath:
\documentclass{article}
\usepackage{amsmath}
\newcommand\scriptstack[2]{\genfrac{}{}{0pt}{}{#1}{#2}}
%\genfrac{<left-delim>}{<right-delim>}{<thickness>}{<mathstyle>}{<numerator>}{<denominator>}
\begin{document}
\[
\mathrm{shaft = 20^{\scriptstack{+0.080}{+0.005}} mm}
\]
\end{document}
Without any package:

\documentclass{article}
\begin{document}
$\mathrm{shaft}=20^{\begin{array}{@{}c@{}}
\scriptscriptstyle +0.080\\[-7pt]
\scriptscriptstyle +0.005
\end{array}}\mathrm{mm}$
\end{document}
array as @{}c@{} instead of simply as c, you can dispense with the \!\! directives.
– Mico
Aug 28 '14 at 05:39
Try
\documentclass[12pt,preview,border=3mm]{standalone}
\usepackage{amsmath}
%---------------------------------------------------------------%
\begin{document}
\[\text{shaft} = 20^{\substack{+0.080\\+0.005}}\,\text{mm}\]
\end{document}
But this is not standard notation for tolerance. For it see siunitx package.
Edit:
As mentioned Mico, third line arise substack for one line and \scriptscriptstyle make indices smaller:
Corrected code:
\documentclass[12pt,preview,border=3mm]{standalone}
\usepackage{amsmath}
%---------------------------------------------------------------%
\begin{document}
\[\text{shaft} = 20^{\substack{\scriptscriptstyle+0.080\\\scriptscriptstyle+0.005\\~}}\,\text{mm}\]
\end{document}
\scriptscriptstyle in front of each element in the substack to make the numbers sufficiently small. Adding a third, empty, row may also be needed to raise the entire substack a bit more.
– Mico
Aug 28 '14 at 04:42
Another solution using low level functions:
\documentclass{article}
\usepackage{amsmath,siunitx,xparse}
\NewDocumentCommand{\mySI}{O{}mom}{%
\IfNoValueTF{#3}
{\SI[#1]{#2}{#4}}
{\SI[parse-numbers=false,#1]{\num[parse-numbers=true]{#2}\douncert{#3}}{#4}}%
}
\NewDocumentCommand{\douncert}{m}{%
^{%
\vbox{
\def\myrow##1{\num{##1}}
\let\\=\cr\tiny
\offinterlineskip\lineskip=1pt
\halign{\myrow{##}\hfil\cr#1\crcr}
}%
}%
}
\NewDocumentCommand{\tvar}{m}{\textnormal{#1}}
\begin{document}
\[
\tvar{shaft}=\mySI{20}[+0.080\\+0.005]{mm}
\]
\end{document}

If you use \vcenter instead of \vbox, the result would be

If you want something that produces the same vertical spacing as the O.P.'s example, you can try the stackengine package:
\documentclass[12pt,preview,border=3mm]{standalone}
\usepackage{amsmath}
\usepackage{stackengine}
\setstackEOL{\\}
\begin{document}
\[\text{shaft} = 20^{\,\setstackgap{L}{2ex}\everymath{\scriptscriptstyle}\Vectorstack{+0.080\\+0.005}}\,\text{mm}\]
\end{document}

amsmathcomplying answer using\genfrac. – egreg Aug 28 '14 at 09:17