Your \substack/\text solution is quite reasonable, particularly as it does not require specifying the width. Just be aware of spurious spaces. However, if one wishes one can define a multiline version of \text:

\documentclass[a4paper]{article}
\usepackage{amsmath,times,varwidth}
\makeatletter
\DeclareRobustCommand{\textblock}[1]{%
{\mathchoice
{\textblockdef@\displaystyle\f@size{#1}}%
{\textblockdef@\textstyle\f@size{\firstchoice@false #1}}%
{\textblockdef@\textstyle\sf@size{\firstchoice@false #1}}%
{\textblockdef@\textstyle \ssf@size{\firstchoice@false #1}}%
\check@mathfonts
}%
}
\def\textblockdef@#1#2#3{\begin{varwidth}{\textwidth}
\everymath{#1}%
\let\f@size#2\selectfont
\baselineskip=\f@size pt
\baselineskip=1.1\baselineskip
\centering
#3
\end{varwidth}}
\begin{document}
\begin{equation*}
e = \underbrace{m}_{\textblock{I wish this text\\to be in two lines}}
\cdot \underbrace{c^2}_{\textblock{and the\\ same here}}
\end{equation*}
\end{document}
The definition of \textblock is based on that of \text from amstxt.sty, but just assumes we are in math mode. It will adapt its font size according to its placement in the equation, and will inherit font characteristics of the surrounding text. I have chosen to make the text centered in the box automatically. The math sizing information contains no specification of the baselineskip, so I have chosen a value that is slightly tighter than normal text.
\usepackage{mathptmx}instead of\usepackage{times}or, even better,\usepackage{newtxtext,newtxmath}. – egreg Jan 04 '17 at 10:53