Basic pH testing doesn’t have to be expensive, necessarily, but I’ve yet to find a field test kit or device that suits my own use cases. But I have to believe a solution is out there!
But that’s soil and water. For rocks I’ve heard of using a dropper of some kind of acid and seeing if it bubbles in contact with the rock (which would indicate a lime-rich rock).
When it comes to your last question, though, I think that yes, some of it just does come down to having learned a bunch of individual facts about different substrates to the point of being able to visually identify them. For example I’ve learned that the shales exposed in ravines in my area are calcareous by reading about local geology, but that the sandstone and conglomerate layers in some of the upper strata are more acidic, and I can visually identify at least some kinds of granite, which are acidic, and I know from reading that the leaf litter beneath most of our hardwoods tends towards alkaline, especially under basswood, ash, and elm- while the needle duff beneath hemlock canopies is generally acidic. I’ve also learned that clays are confusing and hard to make assumptions about.
Another helpful thing to learn is common indicator organisms- plants especially. Again it’s sort of a case-by-case basis, but certain ferns will only be growing on lime-rich rocks or acidic rocks, and are easier to identify in and of themselves than the associated mosses. Likewise the presence of particular plant species in a groundwater-fed wetland can tell you whether the water discharge is more mineral-rich/alkaline or not, and low herbaceous flora is also often a good indicator on dry land.