Why "second to none" is being considered as "the best" instead of "the worst" (almost non existent)? To my understanding - "none" is "nonexistent", while "second to none" should be... well... almost nonexistent.
This dates back to the Coldstream Guards
The regiment is ranked second in the order of precedence, behind the Grenadier Guards. This is because the Grenadier Guards have served the Crown for a longer period of time. However, the Coldstream Guards is an older regiment, and because of this, has the motto Nulli Secundus (Second to None). The regiment has been referred to as the "Second Regiment of Foot Guards" in Parliamentary state papers,1 but this term has long fallen into disuse and was never used by the regiment, hence their motto. When parading with the other four regiments, is always on the extreme left of the line, with the Grenadier Guards on the extreme right. This ensures that the regiment is indeed "Second to None".
Think of the meaning of the following sentence (modeled off your title):
The size of John's house is second to Jane's house.
While John's house is (presumably) quite large, Jane's is larger.
The size of John's house is second to none
says that there is nothing to which it is second (so it is first).
The reasoning that "second to none" could mean "almost the worst" is a fallacy due to the logical form interpretation of the word "none" in this context. In this context the word "none" actually negates the whole expression, so "X is second to none" means "X is not second to any" or more verbosely, "there does not exist any Y with the property that X is second to Y".