Rough answer : almost all small dims can appear, there are some restrictions to large dims.
For example, considering 1 matrix all dims between 1 and n appear. Taking centralizers of these all numbers of the form sum a_i^2 where a is a partition of n appear.
In general, consider k-tuples of positive integers a and b such that their scalar product a.b=n (a should be thought of as the Morita setting, b as the matrix-sizes of the semi-simple part of the subalgebra), then any number of the form
sum b_i^2 + subsum b_ib_j
is possible (here 'subsum' means just that one is allowed to take all these terms, or none or any selection)
There are some obvious restriction wrt large dimensions. For example, there cannot be an 8-dml subalgebra of 3x3 matrices as its semi-simple part can be at most C x M_2(C) and so its dimension must be smaller or equal to 7. For general n there cannot be subalgebras with dimensions between the dim of the largest parabolic subgroup of GL(n) and n^2.