What are the dimensions of a and b in van der Waal's real gas formula?
Part of your confusion is in the formula you have written.  According to the Tanner's General Chemistry webpage The van der Waals Equation, if you are considering 1 mole of a substance, then the formula is

$$(P+a/V^2)(V-b) = RT$$

For $n$ moles

$$(P+an^2/V^2)(V-nb) = nRT$$

The Science HQ website Van der waal’s equation, the constants $a$ and $b$ represent pressure and volume corrections respectively.  The units are based on the formula for $n$ moles of substance (the 2nd equation above).

Taking each term on the left hand side individually:

$(P+an^2/V^2)$ is the van der Waals equation equivalent for $P$ in the ideal gas equation, thus this therm must have the same unit, so using $Pa$ as the unit for pressure would require that the units of $a$ to be $Pa L^2 mol^{-2}$  (the website uses the unit $atm$, but the same idea still applies.

In a similar manner, the term $(V-nb)$ is the van der Waals equivalent of $V$ in the ideal gas equation.  So to keep the unit as for volume in the second term, the unit for $b$ must be $Lmol^{-1}$.

One thing to always be careful with, as there are a number of units used for both pressure and volume, it is imperative to keep these constant throughout your calculations.

For example, volume can be expressed as $m^3$ or $L$ and several others (hence the $L^2$ term above would be the same as $(m^3)^2$ or simply $m^6$).

One final document is a master list of $a$ and $b$ constants for several chemicals (once again be careful with the units - unit conversion are provided in the document), van der Waals constants for gases.. Also further explanations of the above can be found on this Purdue University page entitled Deviations from Ideal Gas Law Behavior