Animals certainly have "preferences".
The color of the substrate can mean many things to them, one thing being the fact that they can "hide" near it or not. A dark fish will be "camouflaged" if it's near dark substrate, and a pale fish will be more difficult to spot against a pale background. Fishes are aware of this and therefore may be more stressed when they are the only bright or dark spot in the area. Camouflage protects them from predators. Plants and soils, aside from contributing the the chemistry of the water, probably have something that corresponds to a "smell" or a "taste" which your fish can appreciate or not. Note that your previous substrate contained bacteria to which they were used, while the new one probably has that new car smell. (lol) Remember not only the color changed, the soil itself changed. They notice that.
Goldfishes are directly aware of their environment, they have eyes to see. Their memory is also much better than 10 seconds like some myths state. Fishes will interact with eachother and you will notice behavior differences when you introduce different fishes with eachother. Some also prefer to be alone. Some generalities can be said about a species, for example bettas will be less stressed when alone. However, every fish is unique and you might indeed notice that one has a best friend, depending on the type of fish. One might have a favorite spot in the aquarium, a favorite plant to hang around. This might also relate to the idea of "territory".
The link provided in a comment by Trond Hansen states that goldfish have a memory of at least 3 months and can recognize people faces. http://thegoldfishtank.com/goldfish-facts/
I know from experience that they will recognize the person who feeds them and will understand it's feeding time when you approach them.
To ask if they have opinions is a bit of a longshot... Stress is a reality for them, but do they have ideas? As a conscious human, we cannot judge the consciousness of other organisms. Animals seem to "think" a lot less than humans, however they are still very intelligent. A fish will not waste its time thinking how the new soil is better or worse than the last one. However their level of comfort or discomfort with the change and with the current environment will be noticeable. Mental and physical health are very tightly related, even more so in animals than in humans.
Animals and fishes can have aesthetic preferences, for example when chosing a mate. Preferring a piece of decoration based on its color or "look" just because it looks cool to them? Maybe. You probably heard the story of the bird that was "in love" with a plastic replica of its specie. They have instincts to respond to different stimuli, instincts which can be manipulated to some extent.
They can certainly have favorite foods, which can differ from one fish to another even in the same species.
Fishes can be depressed (lethargic) or happy (active, curious) because of their environment. Animals can go crazy with boredom in a small non-stimulating habitat. Do they feel emotions like sadness, anger, the same as us? There is no way to tell.
The question is very general and almost metaphysical so I answered with my general knowledge and experience with fish, and tried to dig up some interesting questions. I also tried to answer your question about the soil (color) change.
I don't have too much facts for you, and facts are not my goal when discussing the psychology and measurement of consciousness of animals. Very interesting question, just fun to discuss about that