What would be the exact function for a ridge logistic regression with multiple variables? I am looking for the correct equation for a ridge logistic regression for multiple variables. I thought it simply was:
$$y=\frac1{1+e^{-(\beta_0+\beta_1X_1+\beta_2X_2+\cdots+\beta_nX_n)}}$$
with an additional penalty parameter added, in this case
$$\sum_i^n (y_i-\widehat{y_i})^2 + \lambda \sum_j^p \beta_j^2$$
Eventually
$$y=\frac1{1+e^{-(\beta_0+\beta_1X_1+\beta_2X_2+\cdots+\beta_nX_n)}}+\sum_i^n (y_i-\widehat{y_i})^2 + \lambda \sum_j^p \beta_j^2$$
Is this true for a ridge regression?

The method of estimation does not affect the regression equation. Your logistic regression model is always the equation you posted in the first equation (save some technicalities).
If you estimate the parameters using the usual maximum likelihood estimation, you will get different estimated values of the parameters than if you use regularization, but those estimates are just guesses at the true values of the $\beta_i$.
As a heads up, the traditional loss function for logistic regression is log loss, not square loss.
$$
L(y,\hat y)=-\sum\bigg[
y_i\log(\hat y_i)+
(1-y_i)\log(1-\hat y_i)\bigg]
$$
In the equation, $y=(y_1,\cdots,y_n)$ is the vector of observed classes (so all $0$s and $1$s), and $\hat y =(\hat y_1,\cdots,\hat y_n)$ is the vector of predicted probability values.
