I have recently answer a question about some $\mathrm{p}K_\mathrm{a}$ value discrepancies on different hydroxytetralone derivatives. As Oscar Lanzi pointed out in his answer that the major reason why o-isomer is less acidic is acid groups' capability to have (strong) hydrogen-bond with available electron donor. For example, for tetralone, it is the carbonyl oxygen of o-ketone group. Thus, the stability of the conjugate base does not solely determine the acidity of the parent compound.
Let's look at some experimental $\mathrm{p}K_\mathrm{a}$ values of known nitrophenols and related compounds (Ref.1):
$$
\begin{array}{l|c|c|r}
\text{Entry} & \text{Compound} & \text{Ionic strength} & \mathrm{p}K_\mathrm{a} \\
\hline
1& \text{phenol} & 0 & 9.98 \\
2& \text{phenol} & 0.100 & 9.78 \\
3& \text{2-nitrophenol} & 0.100 & 7.05 \\
4& \text{3-nitrophenol} & 0.100 & 8.18 \\
5& \text{4-nitrophenol} & 0.100 & 6.96 \\
6& \text{2-Hydroxybenzaldehyde} & 0.100 & 8.14 \\
7& \text{3-Hydroxybenzaldehyde} & 0 & 9.02\text{ (Ref.2)} \\
8& \text{4-Hydroxybenzaldehyde} & 0.100 & 7.45 \\
9& \text{6-Hydroxy-1-tetralone} & 0.100 & 7.74 \\
10& \text{2-Hydroxyacetophenone} & 0 & 10.26 \\
11& \text{2-Hydroxyacetophenone} & 0.100 & 10.07 \\
12& \text{3-Hydroxyacetophenone} & 0 & 9.19\text{ (Ref.2)} \\
13& \text{4-Hydroxyacetophenone} & 0 & 8.05\text{ (Ref.2)} \\
14& \text{4-Hydroxyacetophenone} & 0.100 & 7.87 \\
\hline
\end{array}
$$
The compounds were chosen as the hydrogen of o-hydroxyl group may be intramolecularly hydrogen bonded to the electro-donating substitution group. In nitro compounds, it is $\ce{N-O}$ group, In benzaldehyde compounds, it is oxygen of $\ce{CHO}$ group, and In acetophenone compounds, it is oxygen of $\ce{CO-CH3}$ group.
A comparison of p- (Entries 5, 8 & 13; mesomeric) and m-substitutions (Entries 4, 7, and 12; pure inductive) in all phenol derivatives, have shown the well known enhancement from mesomeric interaction of p-groups and inductive interaction of m-group effects, increasing the acidity in both cases (increasing the stability of the conjugate base). However, as in the previous question, the effects important to current question is the interactions of groups ortho to each other such as those in entries 3, 6, and 11. As the authors of Ref.1 correctly put it, the unusual correlating substituent effects particularly by the o-substitution should be due to the formation of intramolecular hydrogen bonding. Thus, it is safe to say that the strength of hydrogen-bonding in parent molecule play a significant role in acid strength compared to the stability of conjugate base achieved by the same substitution.
References:
- Lawrence B. Magnusson, Clarence Postmus, Jr., and Carolyn A. Craig, "Coördination in Solutions. I. Acid Strengths of Phenol Derivatives in Water," J. Am. Chem. Soc. 1963, 85(12), 1711-1715 (ODI: https://doi.org/10.1021/ja00895a001).
- The $\mathrm{p}K_\mathrm{a}$ for 3-hydroxyacetophenone is from: F. G. Bordwell and Glenn D. Cooper, "Conjugative Effects of Methylsulfonyl and Methylthio Groupings," J. Am. Chem. Soc. 1952, 74(4), 1058–1060 (ODI: https://doi.org/10.1021/ja01124a057).