Can an aquarium which was used originally for a spider habitat, be repurposed for creating a fish habitat? Is there any particular way it should be cleaned, if it can be?
No, it's not worth the risk.
Any aquarium needs to be watertight. With 100% certainty that is will hold said water for 20+ years. For that they use glass that will hold the pressure of the water without any problems. And use special kits to seal the edges.
That way you can go to sleep without worries about "when will that fish tank break?" 20 liters is very small for an aquarium, but will mess up your floor big time. Not to mention, if you are late to discover the leak, your fishes might be dead.
So, you probably can do the conversion. I don't think it's worth the risk. And if you think it might be a good way to keep the costs down, small aquaria are not that expensive.