Combination of longtable, makecell and booktabs is not good combination for what you like to achieve. If you will change your MWE to
\documentclass{article}
\usepackage{longtable, makecell, booktabs}
\usepackage[table]{xcolor}
\begin{document}
\begin{longtable}{@{} m{0.1\linewidth} m{0.8\linewidth} @{}}
\toprule
\rowcolor{gray!30}
\multicolumn{2}{p{0.9\linewidth}}{\makecell{Top line\\Bottom line}}\\ % <---
\midrule
\endhead
a & b \\
\bottomrule
\end{longtable}
\end{document}
than you will get:

Using longtblr of tabularray package may require some learning steps, but with it you can get the following result:

In this case the MWE is:
\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\begin{longtblr}[
caption = {Caption},
label = {longtab:1}
]{colspec = {m{0.1\linewidth} m{0.9\linewidth}},
cell{1}{1} = {c=2}{c, bg=gray!30},
hspan = minimal,
rowhead = 1
}
\toprule
{Top line\\Bottom line}
& \\
\midrule
a & b \\
\bottomrule
\end{longtblr}
\end{document}