It might slightly increase the size of the compiled classes (and generated jars) but that's usually unimportant. And classes are loaded only when really used, instantiated with 'new'.
In Processing/Java, classes & OOP, although generally "hidden", are actually integral part of the language.
Ah, and if you wonder, say, if using an array of PVectors is more costly than using two arrays of coordinates, the answer is yes, there is a small memory overhead per object/vector, and some time spent to create them (and destroy them when no longer used). But usually, the brought convenience far outweighs the small performance loss.
To refer to your title: you cannot declare a class "only when needed: Java is a compiled, strongly typed language, so everything must be there from the start (of the run). But as I said, if you don't use them, they cost nothing.