Background. I have a conjecture (stated in two ways below), which I would like to see whether it is true (both the inequality part and the part involving the equality cases). The motivation comes from this thread. The conjecture (both the inequality part and the equality cases) is known to be true when the base field $\mathbb{K}$ has the property that, for any positive integer $l$, the only solution $(x_1,x_2,\ldots,x_l)\in\mathbb{K}^l$ to $$x_1^2+x_2^2+\ldots+x_l^2=0$$ is $x_1=x_2=\ldots=x_l=0$. Subfields of $\mathbb{R}$ are examples, but there are other fields with this property such as pure transcendental extensions of $\mathbb{R}$ and ordered fields. (They are all fields of characteristic $0$, by the way.)
Conjecture (Version I). Let $\mathbb{K}$ be a field. Let $\mathcal{V}$ and $\mathcal{W}$ be two finite-dimensional vector spaces over $\mathbb{K}$ with dimensions $n$ and $m$, respectively. For an integer $r$ such that $$0\leq r\leq \min\{m,n\}\,,$$ suppose that $\mathcal{T}$ is a subspace of the $\mathbb{K}$-vector space $\text{Hom}_{\mathbb{K}}(\mathcal{V},\mathcal{W})$ such that every linear transformation $\varphi:\mathcal{V}\to \mathcal{W}$ in $\mathcal{T}$ is of rank at most $r$. Then, $$\dim_\mathbb{K}(\mathcal{T})\leq r\,\max\{m,n\}\,.$$
Here are the equality cases.
(a) For $m< n$, there exists an $r$-dimensional subspace $\mathcal{I}$ of $\mathcal{W}$ such that $\mathcal{T}$ consists of linear transformations $\varphi$ such that $\text{im}(\varphi)\subseteq \mathcal{I}$.
(b) For $m>n$, there exists an $(n-r)$-dimensional subspace $\mathcal{K}$ of $\mathcal{V}$ such that $\mathcal{T}$ consists of linear transformations $\varphi$ such that $\ker(\varphi)\supseteq \mathcal{K}$.
(c) For $m=n$, there are two possibilities.
There exists an $r$-dimensional subspace $\mathcal{I}$ of $\mathcal{W}$ such that $\mathcal{T}$ consists of linear transformations $\varphi$ such that $\text{im}(\varphi)\subseteq \mathcal{I}$.
There exists an $(n-r)$-dimensional subspace $\mathcal{K}$ of $\mathcal{V}$ such that $\mathcal{T}$ consists of linear transformations $\varphi$ such that $\ker(\varphi)\supseteq \mathcal{K}$.
Conjecture (Version II). Let $\mathbb{K}$ be a field. For integers $m,n>0$ and $r$ such that $$0\leq r\leq \min\{m,n\}\,,$$ suppose that $\mathcal{M}$ is a $\mathbb{K}$-vector subspace of the $\mathbb{K}$-vector space $\text{Mat}_{m\times n}(\mathbb{K})$ such that each matrix in $\mathcal{M}$ is of rank at most $r$. Then, $$\dim_\mathbb{K}(\mathcal{M})\leq r\,\max\{m,n\}\,.$$
Here are the equality cases.
(a) For $m< n$, there exists an $r$-dimensional subspace $\mathcal{C}$ of $\mathbb{K}^m$ such that $\mathcal{M}$ consists of matrices whose column spaces are contained in $\mathcal{C}$.
(b) For $m> n$, there exists an $r$-dimensional subspace $\mathcal{R}$ of $\mathbb{K}^n$ such that $\mathcal{M}$ consists of matrices whose row spaces are contained in $\mathcal{R}$.
(c) For $m=n$, there are two possibilites.
There exists an $r$-dimensional subspace $\mathcal{C}$ of $\mathbb{K}^m$ such that $\mathcal{M}$ consists of matrices whose column spaces are contained in $\mathcal{C}$.
There exists an $r$-dimensional subspace $\mathcal{R}$ of $\mathbb{K}^n$ such that $\mathcal{M}$ consists of matrices whose row spaces are contained in $\mathcal{R}$.
Warning. While I am quite confident that the inequality is true, I am not very sure that I got the equality cases right. If there are counterexamples, I would love to see.
Remark. I just noticed that joriki posted this reference under the question here. I have not yet digested it, but it seems says that the inequality holds when $m=n$ for any field $\mathbb{K}$. Maybe, the proof can be modified to allow $m\neq n$. There does not seem to be any mention of the equality cases in this paper. Theorem 3 of the paper gives the equality condition.
Edit. The conjecture (both the inequality part and the equality cases) is true when $m=n$. Now, we have to find out what to do when $m\neq n$. By the way, using duality or transpose, we may assume that $m<n$. (Perhaps, we can even allow $\mathbb{K}$ to be a division ring.)