Given a point and a line in homogeneous coordinates, what is the coordinate of the projection of the point on the line? Knowing $M$ and $L$ in homogeneous coordinates, how can we determine the coordinates of the point $P$?


it still depends on what kind of projection is required; Given the constraints in the original post, it looks like an orthographic parallel projection. Both central projection and parallel projection (oblique or orthographic) are computation-friendly redefined as a common algebraic formulation equation 3.1 in Householder elemenetary matrix form this arXiv.org article: Unified Framework of Elementary Geometric Transformation 
Suppose the homogeneous coordinates of the point $(x,y,1)^T$ and the line $(a,b,c)^T$; then an orthographic parallel projection onto the line $(a,b,c)^T$ uniquely determined by $(a,b,c)^T$ and its normal direction per definition 3.6, definition 3.7 and equation 3.1 (line No. 2 of table 1 in page 9) for 2D projective transformations in Unified Framework of Elementary Geometric Transformation has the following form:
$$\left[
\begin{array}{ccc}
 1 & 0 & 0 \\
 0 & 1 & 0 \\
 0 & 0 & 1 \\
\end{array}
\right]-\dfrac{\left[
\begin{array}{c}
 a \\
 b \\
 0 \\
\end{array}
\right]\cdot \left[a,b,c\right]}{\left[a,b,0\right]\cdot \left[
\begin{array}{c}
 a \\
 b \\
 c \\
\end{array}
\right]}
=\dfrac{1}{a^2+b^2}\left[
\begin{array}{ccc}
 b^2 & -a b & -a c \\
 -a b & a^2 & -b c \\
 0 & 0 & a^2+b^2 \\
\end{array}
\right]$$
Then the orthographic parallel projection of $(x,y,1)^T$ onto the line $(a,b,c)^T$ is:
$$\dfrac{1}{a^2+b^2}\left[
\begin{array}{ccc}
 b^2 & -a b & -a c \\
 -a b & a^2 & -b c \\
 0 & 0 & a^2+b^2 \\
\end{array}
\right]\cdot \left[
\begin{array}{c}
 x \\
 y \\
 1 \\
\end{array}
\right]= \dfrac{1}{a^2+b^2}\left[
\begin{array}{c}
 b^2 x-a b y-a c \\
 a^2 y-a b x-b c \\
 a^2+b^2 \\
\end{array}
\right]$$
