Flarum uses Laravell's validator to make sure usernames match certain conditions; having no spaces is one of those conditions, and the fact that the username is used in a URL is the reason why. Your best bet would be to run some sort of check on usernames entered via your form and make sure they match the format that Flarum is expecting.
Eventually Flarum should have screen name functionality that will allow users to display a screen name (which may include spaces) in place of their registered username. But the conditions for a valid username aren't likely to change anytime soon.