We had subspaces of $V$, $U_1$ and $U_2$ that had and equivalence relation ~ defined. It is defined as an automorphism $f: V \rightarrow V $ where $f(U_1)=U_2$.
In this case, the two vector spaces are equivalent to each other if their dimensions are finite and equal.
What I'm interested in, in this case, is if there is some kind of characterisation for this relation that also works in infinite dimensional spaces - for example something with a codimension, but I can't seem to find anything that can resemble it closely.
You can apply your definition to an arbitrary $V$. What you would obtain is that $U_1$ and $U_2$ are equivalent if and only if both their dimensions and codimensions agree.
It is very easy to prove this, by using that you can always extend a basis from a subspace to the whole space, and using that an automorphism will send a linearly independent set into another linearly independent set.