A rapid diagnosis of black rot in brassicas, a devastating disease caused by Xanthomonas campestris pv. campestris (Xcc), would be desirable to avoid significant crop yield losses. The main aim of this work was to develop a method of detection of Xcc infection on broccoli leaves. Such method is based on the use of imaging sensors that capture information about the optical properties of leaves and provide data that can be implemented on machine learning algorithms capable of learning patterns. Based on this knowledge, the algorithms are able to classify plants into categories (healthy and infected). To ensure the robustness of the detection method upon future alterations in climate conditions, the response of broccoli plants to Xcc infection was analyzed under a range of growing environments, taking current climate conditions as reference. Two projections for years 2081–2100 were selected, according to the Assessment Report of Intergovernmental Panel on Climate Change. Thus, the response of broccoli plants to Xcc infection and climate conditions has been monitored using leaf temperature and five conventional vegetation indices (VIs) derived from hyperspectral reflectance. In addition, three novel VIs, named diseased broccoli indices (DBI1-DBI3), were defined based on the spectral reflectance signature of broccoli leaves upon Xcc infection. Finally, the nine parameters were implemented on several classifying algorithms. The detection method offering the best performance of classification was a multilayer perceptron-based artificial neural network. This model identified infected plants with accuracies of 88.1, 76.9, and 83.3%, depending on the growing conditions. In this model, the three Vis described in this work proved to be very informative parameters for the disease detection. To our best knowledge, this is the first time that future climate conditions have been taken into account to develop a robust detection model using classifying algorithms.