Layout is important. Whatever is printed on the key caps is not.
As Rajagra noted, there are some physical differences between layouts aside from the assigned keys, so you want to pick a board that at least is physically compatible with the layout you'd like.
Further on, there's also a matter of incompatible key combos. Most mechanical keyboards should have little to no issues with that, but I've mentioned before that my 1992 Model M does not register CAPS+Left shift+S* because of the layout of the underlying matrix, which is annoying if you've remapped CAPS to CTRL and want to press CTRL+SHIFT+S ("Save as..." in many programs).
* AFAIK, it looks like Unicomp boards - and maybe later Model Ms - do allow this combo, but it's still only 2 key-minimum rollover, so you might end up with other combos that don't work if you remap modifiers. IMHO if you're using unusual layouts, that's a good reason to check rollover specs on keyboards before buying.