Johan Schmidt pushes the boundaries of science. Although supported by better scientific minds, he is very much on the fringe of what's possible with current (1940's) science.
The Tesseract has been hidden incredibly well. That castle is an old building that has clearly been guarded (and forgotten by others) for a long time.
The tower keeper himself seems distraught at the death of his family and loved ones, yet he does not kneel to Schmidt even after learning of their deaths. This means that he is devoted to his duty as a guardian, and considers hiding the Tesseract as his life's purpose. This further proves how diligently the Tesseract has been hidden.
Schmidt appearing in the castle already proves that he did his homework. This was not a trivial location to have a look for the Tesseract. It stands to reason that Schmidt would know everything about the Tesseract before knowing its hidden location. General knowledge about the Tesseract would be comparatively easier to find than the actual Tesseract.
Also look at the scene where Schmidt first activates the machine; and then very confidently pushes the machine over its safe limits, without any idea as to what will happen and a strong suggestion from the scientist (who built the machine) to not do so. Schmidt, while a scientist at heart, is driven by his belief that this machine will do what he wants it to do, and he completely foregoes any safety precautions or even measured expectations.
So the answer to your question can be distilled from the things I've mentioned.
- Schmidt has been searching for the Tesseract for a long time.
- Due to how well it has been hidden, Schmidt will have had to browse many pieces of information pertaining to the Tesseract.
- Schmidt does not need to know that the Tesseract was Odin's; he just needs to believe that it was. Schmidt has proven himself to be driven by his goals, not by what is currently in front of him.
Or, to condense this into a shorter answer: He had become an expert on Tesseract knowledge; because he needed to locate it at all costs.