I need to find a subspace $V$ of polynomial ring $Q[x]$ such that $dim(V)=dim(Q[x]/V)$. Note that the scalars also come from rationals.
By the usual theorem: $dim(Q[x])=dim(Q[x]/V)+dim(V)$
But in this case $dim(Q[x])$ is infinite.
So is it enough to produce subspace and quantient space both which have infinite dimension, say $V$ is a space such that the polynomial is divisible by $x^4$?
Yes. In your example, $V$ is infinite dimensional with countable dimension (a basis is given by $(x^4,x^8,x^{12},\dots)$ and $\mathbb{Q}[x]/V$ is also infinite dimensional with countable dimension (a basis is given by $(1,x,x^2,x^3,x^5,x^6,x^7,x^9,\dots)$).
(A remark: here it's important to consider a quotient of vector spaces. If later on you learn about rings, the quotient $\mathbb{Q}[x]/(x^4)$ will mean something different.)