For simplicity I want to stick to the compact, orientable case. Further i want to assume, that $N$ has the structure of a CW-complex.

It might still be interesting to consider the case, where the dimension of $M$ and the dimension of $N$ are different; for example $D^2\simeq pt$ and $[0;1]\times S^1\simeq S^1$.

To find the dimension of $M$ one has to consider the structure of the (co-)jhomology and the $\cap$-product. The dimension of $M$ is the dimension of the highest non-vanishing homology $H_*(N)$. Futhermore $H_*(N)$ and $H^*(N)$ have to satisfy Poincare duality, so that the highest non-vanishing homology has to be $\mathbb{Z}$ and if one picks a generator, the $\cap$-product with this generator has to give isomorphisms.
If this is satisfied, $N$ is called a "Poincare complex". (One can consider some simple examples of manifolds with boundaries like a disk bundle over a manifold or $S^1\times S^1\setminus D^2$).

The question whether a given Poincare complex is homotopy equivalent to a manifold (the other way round) is one classical problem in surgery theory.

There is a involved obstruction process coming, which is very roughly described in the wikipedia. More details can be found for example in the books mentioned there.

There should also be twisted versions of Poincare duality int the nonorientable case, which should also give a complete answer.

I do not know, whether the additional assumption, that the Poincare complex $N$ is indeed a manifold with boundary has any consequences for the surgery obstructions.