If you mean "variable" as in the object of study that can vary (like solving an equation x+1=0 over R, your "variable" stand s in for a real number so that is the object of study) then yes. For example, people study spaces of functions like Lebesgue spaces, Sobolev spaces and Hardy spaces. These spaces are equipped with a norm and inner product so the object of study are functions.

​

In algebra this happens all of the time. Lets say we have a left R module M, we can study the space Hom(M,M) which is the space of module homomorphisms from M to itself, which is called the endomorphism ring of M. As the name says, the endomorphism ring is a ring under the operations of pointwise addition and composition. Thus if you'd like you can solve equations here which makes the variables the endomorphisms.