Does an unobserved mediator causes endogeneity? Suppose I'm modeling the probability to apply for a bank loan as a function of gender.
I have then the following DAG:

Wikipedia lists 3 causes of endogeneity
There is measurement error. Suppose I know for sure whether someone is male or female, and whether he applied for a loan or not.
Then there is simultaneity, a.k.a. reverse causality. This must not be a problem, since applying for a loan can't change your gender (if you are a male, you can't become female by applying for a loan).
Then there is "omitted variable bias", which is defined as a "uncontrolled confounding variable". A confounder is a variable that causes both the independent variable and the dependent one. This must also not be a problem: nothing can cause gender, which is determined by the crossover of the DNA at conception.

My relationship may have unobserved mediators.
For instance, females may be segregated in lower paying jobs (they don't apply for STEM degrees) or part-time jobs (they have more family demands and have to take care for the children).
In this case, gender would cause income. Income also cause the probability to apply for a loan: if you are in a lower income bracket, you know the loan will be denied, and so you won't apply.
The DAG becomes:

Income would be a mediator, not a confounder.
Suppose I don't observe income.
Would this cause endogeneity?

The term "endogenous" is vague here because the answer depends on your estimand, i.e., the quantity you want to estimate. If you want to estimate the total difference between men and women in the probability of taking out a bank loan, then you should not include any mediators. If you want to estimate the difference between men and women in the probability of taking out a bank lone due to causes other than their differential incomes, then you need to include income as a mediator.
Most disparities research is concerned with equalizing groups on possible alternative explanations for observed difference between them; for example, if you want to identify whether prejudice by load managers affects people's ability to take out loans, you would want to adjust for all non-prejudice related mediators to identify the relationship that must be due to prejudice. This would include things like income, education, marriage, and other factors that mediate the relationship between gender and whether someone takes out a bank loan that are not related to prejudice.
