Can I envision a language-specific framework wherein "microservices" are just plugins that implement interfaces (Java interfaces, for example) for exposing RPC endpoints, which you then "mount" in your framework, allowing developer-enforced separation of concerns, but still allowing a single codebase to share things like config structures, database accessibility, etc.?
Sure. I can't imagine why anyone would want to do it that way, though. For example, you couldn't realistically open-source one of your services, or write it in a different language. Service-specific database stuff would get hairy, quickly. And so on.
As for the rest, that is what a proper design of module interfaces is supposed to be.
Apparently too many people nowadays don't read books about ADTs (Abstract Data Types).
It is called unit, module, package, library.
No need to put some network layer, with its own set of problems, between method/function calls.