In short, everything can be vector.
There are two usages of the word "vector."
An absolute (and somewhat informal one), it signifies a quantity with length and direction. This is the first usage that you quote, which is common in applications. Like, velocity is a vector, while mass is a scalar.
A relative one. This is common in linear algebra. There "vector" just means element of an explicitly or implicitly specified vector-space. This relativeness goes so far that the very same mathematical object can be a "vector" in different ways.
The source you quote operates with the second one. Both examples you quote explicitly specify the vector space. It says "the vectors in $M_{2,2}$" and "the vectors in $P_2$." It could just as well say "elements" or "objects" instead of "vectors."
You said:
I guess the main idea is that polynomials and matrices are vector spaces which I read about here:
This is exactly right. There is not more to it. The entities you consider are elements of a certain specified vector-space, and you are supposed to work inside that vector-space.
To reiterate with the second usage, it is crucial that the vector-space is specified as without doing so "is a vector" does not mean anything as everything is a vector, in the sense that it can be considered as object of some vector-space.
A related question would be Is arrow notation for vectors "not mathematically mature"? It is at first glance rather different but the underlying issue is the same.