Try to cancel the subscription and then click again on the "subscribe" button. In most cases this works.
This might not necessarily work though, if If the community you want to subscribe to is on beehaw.org.
This could be because beehaw.org has de-federated from lemmy.world for the time being. You would need to create an account on beehaw.org and can subscribe to the communities there directly.
The not finding the community from other instances could be related to that you might one of the first ones to search for that community on those instances.
If the community is not linked yet to an instance, it'll take several searches for that community before the instance will show it in the search result.
The community I want to subscribe to is the one we are currently in, but I can't find it with my account on the lemmygrad.ml instance. The not properly subscribing happens with the account I am currently using. If I manually type the URL, it says it can't find the community. Other communities from this instance work normally on lemmygrad.ml (e.g. [email protected]).
Lemmygrad.ml has been de-federated by all other instances. Maybe that's the reason. It's odd though that it works for some communities but not for others.
I have seen in other threads though that some people ran into similar issues of not finding a community with the url, etc. Unfortunately, I can't remember what the responses to that were.
You might be able to find those comments if you search for posts regarding issues with search for communities.
Edit
I found the following post. Does it help you?
If it still doesn't help you, try to contact your instance admin.
Edit 2
The "subscribe pending" loop has been described by others as a visual bug. If the cancelling and re-subscribing doesn't work, try if you can vote or post in that community even though the status still says pending.