Chemistry - Freundlich Equation's dimensions

Technically speaking, one typically wouldn't write the left hand side unitless, as it is the ratio of the mass of two different components (usually mg of some chemical per gram of the surface).

But, otherwise your intuition is correct and $k$ just needs units that will cancel with $p^{\frac{1}{n}}$ to give the units on the left hand side. So $k$ could have units of $\left(\dfrac{\text{mg chemical}}{\text{g surface}}\right)\left(\mathrm{bar^{\frac{-1}{n}}}\right)$.

We could also reformulate Freundlich's equation in terms of concentration (since we are dealing with an isotherm) as: $$q=KC^{\frac{1}{n}}$$ where $q=m/x$, $C$ is concentration of the chemical and $K$ is a new constant with units of $\left(\dfrac{\text{mg chemical}}{\text{g surface}}\right)\left(\mathrm{{\dfrac{L}{\text{mg chemical}}}}\right)^{\frac{1}{n}}$.