In Newtonian mechanics, including various extensions, like Lagrangian mechanics and Hamiltonian mechanics, the fundamental law determining the equation of motion of a system can always be stated into the form of a system of differential equation of second order in normal form. Namely,
$$\frac{d^2X_i}{dt^2}= F_i\left(t,X_1(t), \ldots, X_N(t), \frac{dX_1}{dt}(t), \ldots, \frac{dX_N}{dt}(t)\right)\:, \quad i=1,\ldots, N\tag{1}$$
where $X_i$ are the coordinates also in a generalized sense of the points of the system. Provided the functions $F_i$ are sufficiently regular, the system (1) admits a unique solution in a set including $t_0$ when initial conditions
$$\left(X_1(t_0), \ldots, X_N(t_0), \frac{dX_1}{dt}(t_0), \ldots, \frac{dX_N}{dt}(t_0)\right) = \left(X_{10}, \ldots, X_{N0}, \dot{X}_{10}, \ldots, \dot{X}_{N0}\right)$$
are given.
Since the functions $X_i=X_i(t)$ must be differentiable up to the second order, the first derivatives must be defined at every instant $t$ where the motion is defined. As a consequence none of $\frac{dX_i}{dt}(t)$ can attain an infinite value.
The graphical representation you discuss is referred to the case $N=1$. The instants of time where the tangent is vertical are associated to infinite velocities and this is not permitted.
Obviously, limit, unphysical strictly speaking, cases can always be produced assuming the functions $F_i$ (essentially the forces acting to the system) affected by some pathology.