我找到的解决方案:
$pages = get_pages();
$pattern = get_shortcode_regex();
foreach($pages as $page) {
if ( preg_match_all( \'/\'. $pattern .\'/s\', $page->post_content, $matches )
&& array_key_exists( 2, $matches )
&& in_array( \'my_shortcode\', $matches[2] ) )
{
echo $page->post_title . <br />;
}
}