### Elasticsearch Version

8.3.3, 8.4.3

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

any

### Problem Description

.ml indices that are closed prevent Kibana monitoring from displaying. Using the GET _ml/anomaly_detectors/_stats endpoint:

```
{
  "error": {
    "root_cause": [
      {
        "type": "cluster_block_exception",
        "reason": "index [.ml-anomalies-shared] blocked by: [FORBIDDEN/4/index closed];"
      }
    ],
    "type": "cluster_block_exception",
    "reason": "index [.ml-anomalies-shared] blocked by: [FORBIDDEN/4/index closed];"
  },
  "status": 403
}
```

### Steps to Reproduce

(Reproduced)

1. Started with the closed .ml indices. (In ESS) Run a plan to change Logging and Monitoring to send to itself (self-monitoring), not a dedicated monitoring cluster.
2. Plan change completed but the cluster's Stack Monitoring page would not render any data, it shows the message that you need to enable it in the console.
3. Opened the .ml* indices and the Stack Monitoring data is displayed.

### Logs (if relevant)

_No response_
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningUsageTransportAction.java
import org.elasticsearch.xpack.core.ml.inference.trainedmodel.InferenceConfig;
import org.elasticsearch.xpack.core.ml.inference.trainedmodel.TrainedModelSizeStats;
import org.elasticsearch.xpack.core.ml.job.config.Job;
import org.elasticsearch.xpack.core.ml.job.config.JobState;
import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSizeStats;
import org.elasticsearch.xpack.core.ml.stats.ForecastStats;
import org.elasticsearch.xpack.core.ml.stats.StatsAccumulator;
import org.elasticsearch.xpack.ml.inference.ingest.InferenceProcessor;
import org.elasticsearch.xpack.ml.job.JobManagerHolder;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
public class MachineLearningUsageTransportAction extends XPackUsageFeatureTransportAction {
    private final Client client;
    private final XPackLicenseState licenseState;
    private final JobManagerHolder jobManagerHolder;
    private final boolean enabled;
    @Inject
    public MachineLearningUsageTransportAction(
        TransportService transportService,
        ClusterService clusterService,
        ThreadPool threadPool,
        ActionFilters actionFilters,
        IndexNameExpressionResolver indexNameExpressionResolver,