Consider an index set $I = \{1, 2, \ldots, n\}$. Let $V$ be a vector space and $v_I$ be a basis that is, $\{v_1, v_2, \ldots, v_n\}$. Let $\phi: I \rightarrow V$ be a map that maps the index set to a basis vector $i \xrightarrow[]{\phi} v_i$. Let $W$ be another $n-$dimensional vector space and $f: I \rightarrow W$ be any map. Then we have the following commutative diagram:

This looks like a universal property since: for all $W$ and $f$, there exists a unique linear transformation $T: V \rightarrow W$. This is true since $T$ is specified by where the basis elements $v_i$ go into $W$.
Now my question: if there is a universal property, there needs to be a certain category and a certain terminal object. What are these in this case?
It seems like the morphism $\phi$ (or really the pair $(I,\phi)$ is the initial object in a category where the objects are morphisms in the ambient diagram and morphisms are the commutative diagrams.
If the ambient category is $\text{Vect}$ where $V,W$ are objects but $I$ is not... I am confused.
This is indeed a universal property, and we can indeed find a category where $(V, \phi)$ is initial.
The category that you're looking for is a certain kind of comma category.
Here's a direct definition.
Objects are pairs $(U, g)$, where $U$ is a vector space and $g$ is an ordinary function $g : I \to U$.
An arrow from $(U, g)$ to $(W, h)$ is a linear map $T : U \to W$ wuch that $h = T \circ g$.
Composition is just ordinary composition of functions. It's easy to verify the axioms of a category from here.
Then we see that the claim "$V$ is the free vector space on $I$" is simply stating that $(V, \phi)$ is the initial object.
This is related to notions of the representability of a functor and of adjoints.
Edit: if you insist that a universal property be stated in terms of a terminal object, just take the opposite category of the one I have described, which makes $(V, \phi)$ into a terminal object.