As far as I know, a visual force page is tied to only one SObject by declaring
<apex:page standardController="Case"> </apex:page>
Is there any way for a visual force page to be dynamic and then display it in page layout for both Account and Case?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Unfortunately, the answer is No. If we need to have the visualforce page on a object's pagelayout, we would need to associate the standard controller of the page to the same object. That too, we would need to hardcode the standard controller in the quotes as you have done it in your code.
There is no way to even dynamically reference the standard controller. You may refer to the below links which are similar to your requirements.