This example should lift any doubt about what to measure; note that in the first two cases the hairlines are perfectly superimposed to each other, showing that there's no issue with \Shortstack
.
On the other hand, the difference you measured is less than 0.4pt, too small to be really noticeable: it depends on the bounding boxes of the characters.
\documentclass{article}
\usepackage{color}
\usepackage{stackengine}
\newcommand{\hairline}[1][black]{%
\leavevmode\kern-0.05pt
\smash{\color{#1}\vrule height 20pt depth 20pt width 0.1pt}%
\kern-0.05pt
}
\begin{document}
\centering
\Shortstack[c]{\hairline{}XXXXXX\hairline{} XXXXXXXXXX}
\hairline{}XXXXXX\hairline{}\\ XXXXXXXXXX
\vspace{20pt}
\Shortstack[c]{%
\hairline[red]Cognicion\hairline[red]
\hairline[green]abstractiva\hairline[green]%
}
\end{document}
