The package titlesec is not compatible with memoir. See `titlesec` and `memoir` class incompability and About memoir and titlesec incompatibility
You can obtain the wanted effect with memoir tools.
\documentclass{memoir}
\setsecnumdepth{subsection} % to number up to subsection
\renewcommand{\chapnamefont}{\normalfont\huge\scshape}
\renewcommand{\chapnumfont}{\normalfont\huge\scshape}
\renewcommand{\chaptitlefont}{\normalfont\Huge\scshape}
\setsecheadstyle{\Large\scshape\memRTLraggedright}
\setsubsecheadstyle{\large\itshape\memRTLraggedright}
\setsecnumformat{\makebox[0pt][r]{\upshape\csname the#1\endcsname\quad}}
% or just \hangsecnum if you want the number to inherit the same font as the title
\begin{document}
\chapter{Test chapter}
\section{Test section}
\subsection{Test subsection}
\end{document}

If you want that the numbers are inside the margin, you can do
\documentclass{memoir}
\setsecnumdepth{subsection} % to number up to subsection
\renewcommand{\chapnamefont}{\normalfont\huge\scshape}
\renewcommand{\chapnumfont}{\normalfont\huge\scshape}
\renewcommand{\chaptitlefont}{\normalfont\Huge\scshape}
\setsecheadstyle{\Large\scshape\memRTLraggedright}
\setsubsecheadstyle{\large\itshape\memRTLraggedright}
\setsecnumformat{\makebox[3pc][l]{\upshape\csname the#1\endcsname\quad}}
\begin{document}
\chapter{Test chapter}
\section{Test section}
\subsection{Test subsection}
\end{document}

You might need to adjust the fixed 3pc space to fit big numbers.
\titleformat*{\subsection}{\itshape}. – Bernard Sep 01 '20 at 22:55